After upgrading to nightly (RC1) ,searchbar placeholder shows “undefined”. After focus, the placeholder display proper text
<ion-searchbar primary [(ngModel)]=“queryText” (ionInput)=“getItems($event)” (ionFocus)=“searchInFocus()” placeholder=“Search”
I was able to fix it by my initializing the ngmodel variable to blank text in the constructor.
2 Likes
It solved my issue. Thanks
class SearchPage {
searchQuery: string = ‘’; // this is ur portion. It should be same as ngmodel in ion-searchbar
items: string[];
constructor() {
this.initializeItems();
}
initializeItems() {
}
}