Why the error 'Uncaught (in promise): TypeError: co.data is undefined View_BirthCertificatePage_0'?

Dear Friends,
I am working for a simple form with one filed to a page. My html sample code is:

  Generated template for the PaymentPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
  Ionic3 Server Send Test

 <ion-content padding>
  <ion-label floating>Username</ion-label>
  <ion-input type="text" name="username" [(ngModel)]="data.username"></ion-input>

  <button ion-button block (click)="submit()">Submit to server</button>



My error message is:

Uncaught (in promise): TypeError: co.data is undefined

Waiting fast reply



Ionic doesn’t accept ngModel

Problem is fixed … :star_struck:

Post here how you fix it, please. Maybe someone needs it

is it truth ? In ionic 2 i think some says it work. You tell the case of ionic 3 ?

Looks like ngModel really works, I was wrong, sorry about it. I just don’t understand how it works with ngModel, because all the times I tried with it didn’t work.

Yes guilper, it will work with as shown in a username text field below

<ion-input type=“text” formControlName=“username” [(ngModel)]=“data.username”>