1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Using ng-class to remove in Angular

Discussão em 'Angular' iniciado por Colm O'Donnell, Outubro 4, 2024 às 06:42.

  1. I'm using ng-class to add a disabled class to a CTA in certain scenarios, but there is a split second delay before it gets applied, which means if the user is quick enough they can click the CTA. See code below:

    <div ng-class="{'disabled-class': !testFunction(name)}">


    If I was to change it to the below, obviously I can use JQuery / Vanilla JS to remove the class when needed, but is there a way to do something similar in Angular?

    <div class="disabled-class">

    Continue reading...

Compartilhe esta Página