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

Signals with null-assertion

Discussão em 'Angular' iniciado por tlzg, Setembro 16, 2024.

  1. tlzg

    tlzg Guest

    In a template, lets say we have something like:

    @if (someSignal()?.someProperty!.trim().length > 0) {...}


    someSignal is not required. not-null assertion on someProperty causes everything after this statement to block (not only the part within the @if block.

    There are ways to circumvent that, I am just curious if this is expected behavior?

    Continue reading...

Compartilhe esta Página