【发布时间】:2015-10-23 21:59:09
【问题描述】:
bootstrap-ui typeahead 没有显示结果。
控制器
.controller('FakturaAddCtrl', function ($rootScope, $scope, $timeout) {
$scope.selected = undefined;
$scope.states = ['Alabama', 'Wyoming'];
});
查看
<div class="form-group">
<label><i class="fa fa-globe"></i> State</label>
<input type="text" ng-model="selected" uib-typeahead="state for state in states | filter:$viewValue | limitTo:8" class="form-control">
</div>
https://angular-ui.github.io/bootstrap/ 上的示例
当我运行时,我只是得到了输入字段,但没有下拉数据(typeahead 功能不运行?)
也没有控制台错误
【问题讨论】:
-
确保您还包括用于预先输入的模板。
-
@dfsq 包含在“ui-bootstrap-tpls.min.js”中?
-
应该是
uib-typeahead而不是bs。
标签: angularjs twitter-bootstrap angular-ui-bootstrap typeahead.js