【发布时间】:2013-12-07 03:56:05
【问题描述】:
http://plnkr.co/edit/VSA1gVEixxis7utvAoQr?p=preview
我认为“状态中的状态”有效,因为它只是一个字符串数组。我想遍历 plnkr.co 示例中 $scope.state_details 中显示的对象数组。
<input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8">
当我有这样的对象数组时,在 typeahead attr 中使用的正确表达式是什么?...
data = [
{
name:"Alabama",
population:2000
},
{
name:"Alaska",
population:20000
},
{
name:"California",
population:200000
},
];
【问题讨论】:
标签: angularjs twitter-bootstrap angularjs-directive angularjs-ng-repeat angular-ui