I am getting an error when binding FormControl to an ion-searchbar in Ionic 4. This used to work in v3. This is an Ionic/Angular project
Here is the ERROR:
<ion-searchbar [ERROR ->][(ngModel)]="searchTerm" [formControl]="searchControl" (ionInput)="onSearchInput()"></ion-searchbar>
"): ng:///HomePageModule/HomePage.html@15:19
Can’t bind to ‘formControl’ since it isn’t a known property of ‘ion-searchbar’.
- If ‘ion-searchbar’ is an Angular component and it has ‘formControl’ input, then verify that it is part of this module.
- If ‘ion-searchbar’ 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. ("
I don’t quite grasp what the error is suggesting I need to do. Any help would be appreciated.
Thanks,
Adam