So first, before you bite my head off, I would NEVER use jQuery in an angular project... never ever... but the client really wants it even if strongly objecting...
AND for future readers... NEVER use jquery on Angular project... there is NO need
Now, that we cleared that up :)
Angular(2) app binds some default click events to some links / buttons...
The clients wants to be able to overwrite the events with jQuery...
this is the pretty standard jQuery code I put in
jQuery( document ).ready(function() {
jQuery(document).on("click", '.b-button button', function (event) {
console.log( "clicked!" );
console.log(event);
event.preventDefault();
event.stopPropagation();
return false;
});
});
While the event is triggered, it seems I cannot cancel it or prevent propagation... angular2 still takes over
what would be the proper way?
for the reference, using 3.2.1 slim version of jQuery