In jQuery, I can get the element that was clicked in the DOM using the following
$(document).click(function(event) {
var element = $(event.target);
console.log(element);
....
}
How would I do the same with Angular? I've searched for it online but all of the solutions were related to elements that had an ng-click attribute like links and buttons. I'd like to listen to the click event for the entire DOM and then get the element that was clicked(p, li, a, span etc.) Is there anyway I can achieve this using Angular only or would I have to use jQuery?