以我的角應用(角1.4.9)我有一個問題,其中,生成多個NG-重複我這樣做時:角生成多個納克重複序列
HTML:
<div class="form-group col-md-3">
<input ng-model="main.startLocation" ng-change="main.getAddressSuggestions(main.startLocation, 'startLocation')" type="text" class="form-control input-lg" placeholder="fx. Aarhus" tabindex=1 name="country" [![enter image description here][1]][1] />
<label>or select a location from list:</label>
<div ng-repeat="suggestion in main.startLocationSuggestions">
<span>{{suggestion}}</span>
</div>
</div>
控制器.js文件
getAddressSuggestions(address, inputName) {
if (inputName === "startLocation") {
/* var tmpArray = data;
for(var item of tmpArray)
this.startLocationSuggestions = data;*/
this.startLocationSuggestions = ['dada', 'daa'];
}
}
爲什麼角度重複ng重複?