我有一个输入字段,用户可以输入他的地址并获得自动建议:
<ion-label color="primary" stacked>Adresse:</ion-label>
<ion-input type="text" ng-model="autocomplete.query" ng-change="updateSearch()"></ion-input>
Run Code Online (Sandbox Code Playgroud)
我的班级有一个更新方法,我想做点什么,但不幸的是他没有进入它.
updateSearch()
{
console.log('aaa');
if (this.autocomplete.query == '') {
this.autocompleteItems = [];
return;
}
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?