I have a input field where a user can input his address and get auto-suggestions:
Adresse:
ng-model
and ng-change
were used in Angular 1.
With Ionic >= 2, you can use ngModel
and ionChange
.
<ion-input
type="text"
[(ngModel)]="autocomplete.query"
(ionChange)="updateSearch()">
</ion-input>
The parentheses signify that data binding is from the template to the component, the square brackets, component to the template. When both are present, it is a two way data binding.
For more info on template syntax, look at the Angular docs.