"If you've worked with form inputs containing ng-model, you may at a certain point start to wonder why some plugins or even $.fn.trigger('change') isn't updating the model. After some digging through the source, we found that Angular doesn't actually watch the change event by default. Instead it watches the new input event. Read up about the differences here.
A simple hack we did for the AngularUI passthrough directive was to bind to the change event and manually fire an input event, however I recommend instead trying to leverage the new input event where you can instead."
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
element.controller('ngModel').$viewChangeListeners[0]();wpModule.directive('triggerChangeOnBlur', function () {
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.on('blur', function () {
element.controller('ngModel').$viewChangeListeners[0]();
});
}
};
}]);