Angular2 renderer setElementClass isAdd options does not work

Discussão em 'Angular' iniciado por Romain Bruckert, Maio 8, 2025.

  1. Why doesn't this work, as stated in the docs ?

    renderer.setElementClass(el, 'class1', false); // replace class
    renderer.setElementClass(el, 'class2', true); // add a class


    This results in the element only have the class2 instead of both.

    Reference Angular2 renderer docs

    Continue reading...

Compartilhe esta Página