incuna / angular-external-link-interceptor

Angular External Link Interceptor
http://incuna.com/
MIT License
2 stars 0 forks source link

Add required jQuery dependency, or don't use event.currentTarget #10

Open henrahmagix opened 8 years ago

henrahmagix commented 8 years ago

This depends on jQuery since it uses event.currentTarget (introduced in #7), which is created by jQuery.

But perhaps the better fix is not using event.currentTarget. See @grahamgilchrist's comment:

An alternative would be to pass the attributes from the directive as parameters through bindModal and externalModal.

grahamgilchrist commented 8 years ago

I think it is a standard property (see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget) but perhaps jQuery is used to polyfill it in older browsers?

https://api.jquery.com/event.currentTarget/