How to test if event.target.hasClass() using angularJS and jqlite?
Your element from event.target
is a regular HTMLElement, not the JQlite version. You need to do this to convert it:
angular.element(event.target);
If you want to keep using your JS DOM element plain without use jQuery or angular:
event.target.classList.contains('modal-click-shield')
because event.target is a DOM node, not a "jQuery" object. Wrap it
var target = $(event.target);
or
angular.element(event.target);