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

angular signal; must be the object or the primitive value inside be a signal?

Discussão em 'Angular' iniciado por Juergen, Outubro 12, 2024.

  1. Juergen

    Juergen Guest

    In the previous code Angular v.14 I have eg. two objects:

    objA{name:sring, value: number}, objB{name:sring, value: number},


    And a list of this objects:

    ObjList[objA,objb]


    In a template I iterate over this ObjList

    <table *ngFor="let obj of ObjList; let i = index ">
    <input [(ngModel)]='obj .name'
    (keyup)=' keyup (obj)' >
    <input [(ngModel)]='obj .value' >
    (keyup)=' keyup (obj)'
    </table>


    Which ends at east into a way binding of the primitive values and in a related keyup function for each individual object.

    The properties are mutable and will results changes in between each object properties too.

    So must the proberties a signal or is it enouth, that the object istself will be a signal. I not clearly understand the new change detection as

    A) Both, objects and properties will be converted to signal B) only the object will be converted to the signal C) only the properties will be converted to signals

    to have the correct change detection strategy.?

    Continue reading...

Compartilhe esta Página