I found a workaround that fit my needs by using the keypress event along
with the viewchangelistener. Still doesn't catch the case where a user
pastes in text shorter than the minlength requirement, but its an
improvement. The 'change' event seems to have the same issue as
viewChangeListeners. Here's the new link example function:
link: function( scope, element, attrs, ngModelCtrl ) {
var changeFunc = function() { scope.callCount++; };
ngModelCtrl.$viewChangeListeners.push(changeFunc);
element.on('keypress', changeFunc);
}
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.