Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Ionic 4 ion-searchbar and FormControl error

$
0
0

@werewolfe wrote:

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’.

  1. If ‘ion-searchbar’ is an Angular component and it has ‘formControl’ input, then verify that it is part of this module.
  2. If ‘ion-searchbar’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
  3. 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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>