RC1 - Search bar "undefined"


#1

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”


#2

having the same issue


#3

I was able to fix it by my initializing the ngmodel variable to blank text in the constructor.


#4

It solved my issue. Thanks


#5

how to set blank text??


#6

class SearchPage {

searchQuery: string = ‘’; // this is ur portion. It should be same as ngmodel in ion-searchbar
items: string[];

constructor() {
this.initializeItems();
}

initializeItems() {
}
}