Thomas Blauenfeldt Thomas Blauenfeldt - 2 years ago 171
AngularJS Question

typeahead no results no console error

bootstrap-ui typeahead shows no results.


.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">

used example on

when i run i just got the input field, but no drop down data (typeahead function dosen't run?)

also got no console errors

Answer Source

You are referring to ui-bootstrap but using the directive from angularStrap, which is another module.


bs-options="state for state in states"  bs-typeahead


ui-bootstrap >= 0.14 :

uib-typeahead="state for state in states | filter: $viewValue"

ui-bootstrap < 0.14 :

typeahead="state for state in states | filter: $viewValue"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download