1
我取得的所有用戶,但我想要的是,他選擇了當前用戶的NG-重複角JS - 由值id選擇選項選擇選項
<select id="taskUser" class="form-control"
multiple="multiple"
ng-model="taskUser"
ng-options="user.ID as user.Name for user in header.users"
>
</select>
這是我轉發,我展示瞭如何TE列表是這樣的:
<select id="taskUser" class="form-control ng-pristine ng-untouched ng-valid ng-empty" multiple="multiple" ng-model="taskUser" ng-init=" users = header.users[2].id" ng-options="user.ID as user.Name for user in header.users">
<option label="User 1" value="string:1">User 1</option>
<option label="User 2" value="string:2">User 2</option>
<option label="User 3" value="string:3">User 3</option>
</select>
爲了獲得當前用戶ID,我用{{header.user.ID}}比我得到的只是結果:3
這意味着,要選擇這種需要
<option label="User 3" value="string:3">User 3</option>