AngularUI引导,如何在AngularJS中的一组对象上进行提前键入?

AngularUI引导,如何在AngularJS中的一组对象上进行提前键入?,angularjs,twitter-bootstrap,angularjs-directive,angularjs-ng-repeat,angular-ui,Angularjs,Twitter Bootstrap,Angularjs Directive,Angularjs Ng Repeat,Angular Ui,我知道“state for state in states”是有效的,因为它只是一个字符串数组。我想循环浏览plnkr.co示例中$scope.state\u details中显示的对象数组 <input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8"> 我明白了 s.name in s in statedetails 我明白

我知道“state for state in states”是有效的,因为它只是一个字符串数组。我想循环浏览plnkr.co示例中$scope.state\u details中显示的对象数组

<input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8">
我明白了

s.name in s in statedetails
我明白了

s.name in s in statedetails
我明白了

s.name in s in statedetails
我明白了

s.name in s in statedetails

如果希望模型是实际状态对象而不是名称:

typeahead="state as state.name for state in statesdetails"

如果希望模型是实际状态对象而不是名称:

typeahead="state as state.name for state in statesdetails"

如果希望模型是实际状态对象而不是名称:

typeahead="state as state.name for state in statesdetails"

如果希望模型是实际状态对象而不是名称:

typeahead="state as state.name for state in statesdetails"