1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

ngClass has the wrong value while hydrating

Discussão em 'Angular' iniciado por Desperado, Setembro 2, 2025.

  1. Desperado

    Desperado Guest

    This [ngClass] expression doesn't insert the class name into DOM when Angular starts hydrating (only after it's finished)

    <div class="document-pane" [ngClass]="{'single-view-left': true}">


    I confirmed this when I set a breakpoint in one of the child component's constructor, there's no class when I hit it. After hydrating finishes, class is there (in DOM).

    Continue reading...

Compartilhe esta Página