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

Remote attribute's function behavior added #22

Closed Nishchit14 closed 8 years ago

Nishchit14 commented 8 years ago

Get options from service as a deferred object by remote attribute.

HTML

<select selector
    model="country"
    remote= "vm.remote(search)"
    label-attr="name">
</select>

JS

vm.remote = 
    function (search) {
        return MyAppService
                .getCountries({search:search})
    };

For more example Plunkr1 Plunkr2

indrimuska commented 8 years ago

Closes #17

indrimuska commented 8 years ago

Thank you @Nishchit14 for this nice feature!

indrimuska commented 8 years ago

This is now available in v1.1.0.