indrimuska / angular-selector

A native AngularJS directive that transform a simple <select> box into a full html select with typeahead.
http://indrimuska.github.io/angular-selector
MIT License
96 stars 36 forks source link

Promise implementation in remote population #72

Closed matt212 closed 7 years ago

matt212 commented 7 years ago

Hi,

In reference to your solution mentioned in below pointers https://github.com/indrimuska/angular-selector/issues/69#issuecomment-266290433 I have one query, how to implement provided solution with below codebase

$scope.remote = function (search) {

base.search=search;

        Todos.getdetails(base)
            .success(function(data) {
$scope.multiselectcontrolname = data;

            });
    }

wherein getdetails is factory methods

getdetails: function(base) {

            return $http.post('/mrole/api/searchtype/',base.datapayload,base.config);

        },
matt212 commented 7 years ago

I solved the issue , implementing custome api call methodology and tweaking it, in order to work with my rest auth and post methods ! http://plnkr.co/edit/YdzF58o9ykYvMwP5Udza?p=preview