0
easyest created
Angular ui typeahead works fine with standard $http promise, but how to make it work with ABP services created from dynamic API? Like here: <a class="postlink" href="http://plnkr.co/edit/izqWaLWM6YkrZXyArrHm?p=preview">http://plnkr.co/edit/izqWaLWM6YkrZXyArrHm?p=preview</a> Documentation says, that "Notice that we registered to success handler (instead of done) since it's like that in angular's $http service", but this is deprecated, please see deprecation notice at <a class="postlink" href="https://docs.angularjs.org/api/ng/service/$http">https://docs.angularjs.org/api/ng/service/$http</a>.
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
Hi,
You can use it like this
vm.getUsers = function (val) { return userService.getUsers({ filter: val }).then(function (response) { return response.data.items.map(function (item) { return item.userName; }); });; };in view
<input type="text" ng-model="selected" uib-typeahead="user for user in vm.getUsersx($viewValue)" class="form-control">Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)