如何更改angucomplete的ng模型。
我替换了:
<input class="form-control"
ng-disabled="checks.school != 1"
ng-model="items.school"
placeholder="Type a school..."
type="text"">
有了这个:
<angucomplete-alt
disable-input="checks.school != 1"
input-class="form-control form-control-small"
minlength="1"
pause="100"
placeholder="Type a school..."
remote-url-data-field="results"
remote-url="{{completeUrl}}/api/users/complete?field=school&phrase="
selected-object="items.school"
title-field="result"/>
但是,我有两个相同形式的angucomplete输入。两个ng模型输入都被重新定义为searchStr:
<input autocapitalize="off"
autocomplete="off"
autocorrect="off"
class="form-control form-control-small"
disabled="disabled"
id="items.skills_value"
maxlength="524288"
name=""
ng-blur="hideResults($event)"
ng-change="inputChangeHandler(searchStr)"
ng-class="{'angucomplete-input-not-empty': notEmpty}"
ng-disabled="disableInput"
ng-focus="onFocusHandler()"
ng-model="searchStr"
placeholder="Node.js, Django, Sinatra..."
type="text">
那么,我如何将其绑定到控制器?
谢谢!