使用 Angular 选择
https://github.com/localytics/angular-chosen
并测试以下示例
<select multiple
chosen
ng-model="state"
ng-options="s.name for s in states">
<option value=""></option>
</select>
但是,我想知道如何将状态对象的名称值绑定到 ng-model?
The options presented will display just the state names, but when chosen, the entire state object is bound to ng-model rather than just the selected name.
任何想法都会像往常一样受到欢迎!