As i'm trying to use the template driven approach in angular 10 ionic to access the model which gives error on page load.
Now as i have used this approach in the HTML page as.
<form (ngSubmit)="onBookPlace()" #f="ngForm">
<ion-grid>
<ion-row>
<ion-col size-sm="6" offset-sm="3">
<ion-item>
<ion-label position="floating">First Name</ion-label>
<ion-text type="text" name="firstname" ngModel required></ion-text>
</ion-item>
</ion-col>
</ion-row>
<ion-row>
<ion-col size-sm="6" offset-sm="3">
<ion-item>
<ion-label position="floating">Last Name</ion-label>
<ion-text type="text" name="lastname" ngModel required></ion-text>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</form>
What am i missing here .. ?
Update 1:
It states here as well
https://codecraft.tv/courses/angular/forms/template-driven/