Reputation: 28059
In AngularJS, I can use the ng-focus directive to know when I have the focus of an input field, but what about when I lose the focus?
Is there any directive for that?
Upvotes: 25
Views: 31764
Reputation: 26828
The opposite of the focus
event is the blur
event. It's fired when an element loses its focus. So what you are looking for is the ngBlur
directive.
Upvotes: 45