Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

288
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda