Ionic 4 ngModel on input

Hi,
I am getting error "Can’t bind to ‘ngModel’ since it isn’t a known property of ‘ion-input’ " on ionic 4.
how to use ngModel with Ionic 4 ?

`
<ion-item>

<ion-label position=“floating”>Name</ion-label>

<ion-input type=“text” [(ngModel)]=“activeField.name” inputmode=“text”></ion-input>

</ion-item>
`

1 Like

You need to include FormsModule from @angular/forms in the module file for the page you are trying to use ngModel on.

8 Likes

ok Thanx I forgot to add formsModule in app module.

1 Like

import { FormsModule } from ‘@angular/forms’;

1 Like