How to create variable in ngFor loop?

后端 未结 4 1009
梦如初夏
梦如初夏 2020-12-03 06:49

I am trying to find out how to create a variable in an ngFor loop.

I have a loop like this:


  &l         


        
4条回答
  •  离开以前
    2020-12-03 07:06

    I think this is a classic case for making a subcomponent.

    
        
    
    

    Your component would then have a prod input and run the required function once in OnInit.

    Simple example plunk here

提交回复
热议问题