Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
Angular2 vs jQuery: Can jQuery actually cancel angular's bindings?

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

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!