【发布时间】:2014-09-07 23:35:35
【问题描述】:
我有一个 json 对象
states = { id:1, name: "Sales Manager" }
我有一个预先输入的输入
<input type="text"
placeholder="Position"
ng-model="position"
typeahead="title.name for title in states($viewValue)" />
当我选择是否使用 name 变量时,这很好,但我需要使用从 json 中选择的 id 值设置隐藏输入。有什么办法吗?
【问题讨论】:
标签: json angularjs bootstrap-typeahead