我使用https://angular-ui.github.io/bootstrap/中的参考来创建uib-typeahead。但下拉不来。我到处搜索,并且正在做别人说的话,但下拉不会到来。uib-typeahead不能正常工作
HTML:
<div>
<pre>Model: {{tc.selected | json}}</pre>
<input type="text" ng-model="selected" uib-typeahead="state for state in states | filter:$viewValue | limitTo:8" class="form-control">
</div>
JS:
var myApp = angular.module("angularTypeahead", ["ui.bootstrap"]);
myApp.controller("TypeaheadCtrl", function($scope, States) {
$scope.states = ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois"];
});
这里是plunker: https://plnkr.co/edit/qQAGX7u6JJursmItfrf6?p=preview
请告诉我,我错了