Can't bind to 'ngModel' despite importing FormsModule

Can't bind to 'ngModel' despite importing FormsModule
0.0 0

#1

I receive the following error when trying to create a new event on my ionic2-calendar:

Uncaught (in promise): Error: Template parse errors: Can't bind to 'NgModel' since it isn't a known 
property of 'ion-input'. 1. If 'ion-input' is an Angular component and it has 'NgModel' input, then 
verify that it is part of this module. 2. If 'ion-input' is a Web Component then add 
'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress 
this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the 
'@NgModule.schemas' of this component.

The error occurs with every ion-input in which I am attempting to using [NgModule]

My app.module.ts includes the following:

import { NgCalendarModule } from 'ionic2-calendar';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

I have imported the following into the ngModule of event-modal.ts component file where the error is occurring:

import { NgCalendarModule } from 'ionic2-calendar';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
NgCalendarModule,

FormsModule,
ReactiveFormsModule,
],

Finally, I have ran sudo npm install @angular/forms on the terminal yet still receive the error…


#2

Can you show us the code where you use ngModel?

I looked at the ionic2-calendar repo, but I don’t see where they use ngModel.

EDIT: Also not sure if you should import both FormsModule and ReactiveFormsModule.