There is no directive with "exportAs" set to "ngModel" error

Hello I am getting this error while trying to pass data from page to page in ionic

There is no directive with "exportAs" set to "ngModel"

any ideas on how to fix it ?

My Code:

<ion-item>
        <ion-label stacked>Patient Username</ion-label>
        <ion-input  type="text" placeholder="P_JhonDoe" formControlName="p_username"
                    [(ngModel)]="PatientUsername" #ctl="ngModel"></ion-input>
</ion-item>

Remove the #ctl=“ngModel”

Hashtag is to reference to dom elements

1 Like