0
更新我有我的控制器這個方法:範圍模型不上選擇
$scope.selectEscalationResponsible = function($user, $model, $label) {
$scope.escalationResponsible = $user.user.first_name + ' ' + $user.user.last_name;
};
這種方法是由該輸入元素觸發:
<input class="form-control"
type="text"
ng-model="escalationResponsible"
typeahead-wait-ms="200"
select-text-on-focus
typeahead-editable="false"
typeahead="value as (user.user.first_name + ' ' + user.user.last_name) for user in oppType.team_settings.users"
typeahead-on-select="selectEscalationResponsible($item, $model, $label)">
<small translate>Start typing a name from the list below</small>
的方法被觸發,由輸入字段的值未被更新。 我不明白爲什麼。
我看到你的榜樣工作,但它只是沒有在我結束工作。 – Repox
你可以創建一個plunkr嗎? –
我不知道什麼是錯的。出於某種原因,我的代碼現在可以工作。 – Repox