В моем угловом приложении (угловой 1.4.9) У меня есть проблема, где генерируются несколько нг-повторы, когда я это сделать:Угловые генерации несколько нг-повторы
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'];
}
}
Но сгенерированный HTML в РОМ:
Почему угловые повторяют ng-повторы?