Friday, September 29, 2017

Ionic 3: ng-change doesn’t work

I have a input field where a user can input his address and get auto-suggestions:

 <ion-label color="primary" stacked>Adresse:</ion-label>
        <ion-input type="text" ng-model="autocomplete.query" ng-change="updateSearch()"></ion-input>

My class has a update method where i want to do something, but unfortunately he doesn’t get into it.

updateSearch()
  {
    console.log('aaa');
    if (this.autocomplete.query == '') {
      this.autocompleteItems = [];
      return;
    }
}

Any ideas?

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/09/29/ionic-3-ng-change-doesnt-work/
via @lzomedia #developer #freelance #web #lzomedia.com

No comments:

Post a Comment