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

change eventhandler not firing #78

Open farooqhanif-Dev opened 7 years ago

farooqhanif-Dev commented 7 years ago

here is my html:

<select selector multi="true" model="mySelectedOptions" remote="myOptions" change="updateMySelectedOptions" value-attr="optionIdAlt" view-item-template="'selectedOptionsTemplate'" dropdown-item-template="'availableOptionsTemplate'"></select>

and here is the snippet from controller: $scope.updateMySelectedOptions= function(newValue, oldValue) { }

emrahyigit commented 7 years ago

Try as follows:

in the controller: $scope.updateMySelectedOptions= function(oldValue, newValue) { }

and in your html: change="updateMySelectedOptions(oldValue, newValue)"