Reputation: 675
I want to add focus and blur events to the inputs in my form. I have Added it to my custom directives and inputs, but i am using ng-tags-input
as well, how can i register event listeners to that? probably modifyingtagsInputConfig
, but i am not able to implement it properly .. Or should i use a different approach to add event listener to the parent form and implement event bubbling in the child elements . But i guess event capturing is supported in IE9+ , Can anyone tell me an approach which can work on IE8 as well.
Thanks
Upvotes: 2
Views: 1765
Reputation: 14114
ngTagsInput supports both ngFocus
and ngBlur
directives:
<tags-input ng-model="tags" ng-focus="focus()" ng-blur="blur()"></tags-input>
That should be better documented, I must admit it. :|
Finally, ngTagsInput only works with IE10+. If you need to support older versions of that browser, perhaps you should check out this fork.
Upvotes: 1