ng model not working in app.component.html file. What should I do?
Thanks in advance.
<!-- Category Edit Form-->
<ion-card class="ion-padding" *ngIf="EditForm">
<ion-label position="stacked"> <strong>Edit Category</strong></ion-label>
<ion-input type="text" [(ngModel)]="UpdateCategory"> </ion-input>
<div>
<ion-icon class="ion-float-right" name="checkmark-outline" size="large" slot="icon-only" color="primary"></ion-icon>
<ion-icon class="ion-float-left" (click)="closeForm()" name="close-outline" size="large" slot="icon-only" color="danger"></ion-icon>
</div>
<br/>
</ion-card>
Error Message
Can’t bind to ‘ngModel’ since it isn’t a known property of ‘ion-input’.
If ‘ion-input’ is an Angular component and it has ‘ngModel’ input, then verify that it is part of this module.
If ‘ion-input’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
To allow any property add ‘NO_ERRORS_SCHEMA’ to the ‘@NgModule.schemas’ of this component.ng
2 posts - 2 participants