You need $event.currentTarget
instead of $event.target
.
More Related Contents:
- How to set focus on input field?
- angular ng-bind-html and directive within it
- How to call a method defined in an AngularJS directive?
- How to use a keypress event in AngularJS?
- Angular directives – when and how to use compile, controller, pre-link and post-link [closed]
- Angularjs dynamic ng-pattern validation
- Easiest way to pass an AngularJS scope variable from directive to controller?
- Using angularjs filter in input element
- if a ngSrc path resolves to a 404, is there a way to fallback to a default?
- How to autocapitalize the first character in an input field in AngularJS?
- Directive isolate scope with ng-repeat scope in AngularJS
- Accessing attributes from an AngularJS directive
- Custom form validation directive to compare two fields
- How to modify scope from within a directive in AngularJs
- Binding variables from Service/Factory to Controllers
- Call a method of a controller from another controller using ‘scope’ in AngularJS
- AngularJS custom form component / directive using ng-model
- How can you limit the value from input using AngularJS?
- How to set the dynamic controller for directives?
- Can you change templateUrl on the fly?
- Enable/Disable Anchor Tags using AngularJS
- What is `priority` of ng-repeat directive can you change it?
- Illegal use of ngTransclude directive in the template
- How to use `replace` of directive definition?
- How to implement an ng-change for a custom directive
- ng-click doesn’t work within the template of a directive
- How to create a directive with a dynamic template in AngularJS?
- Access Parent Scope in Transcluded Directive
- how do I get ng-include directive to work with a Content Delivery Network?
- AngularJS – Directives vs Controllers