Angular 2 - Dynamic Variables in ngModel

前端 未结 5 2048
半阙折子戏
半阙折子戏 2020-12-31 06:58

How to use dynamic variables in ngModel?

I am trying to use the code below but the following error appears:

5条回答
  •  萌比男神i
    2020-12-31 07:44

    Something like this works fine in my case:

       export class AppComponent {
        qtd:any[] = {};
       }
    

    In html i used index instead of value (num):

提交回复
热议问题