bootstrap typeahead not populating with response from promise
问题 My bootstrap typeahead is as following: <input id="inputId" type="text" ng-model="selected" typeahead="name for name in getSuggestions($viewValue) " typeahead-on-select="typeaheadOnSelect($item)" ng-trim="false"> The getSuggestions() return a promise,like following: $scope.getSuggestions = viewValue => { let deferred = $q.defer(); getSuggestions(viewValue).then(words => { deferred.resolve(words); // array of strings }) .catch(()=>{ deferred.reject([]); }); return deferred.promise; }; NOTE :