Create Html local variable programmatically with Angular2

后端 未结 2 1358
鱼传尺愫
鱼传尺愫 2021-02-10 11:37

I need to know if there is a way to create HTML local variables programmatically.

I am developing a web app where I have an NgFor loop and I want to be able to assign a

2条回答
  •  日久生厌
    2021-02-10 12:26

    You could stick it into the template interpolation since it handles expressions.

    {{setLocalVariable(#elt)}}
    setLocalVariable(_title : string){ let var = do some stuff to _title; return var; }

提交回复
热议问题