Property 'value' does not exist on type Element

前端 未结 1 1942
清酒与你
清酒与你 2020-12-22 10:15

I am trying to sum up the values entered in the mat-table column using an input.

I have created a table with 3 columns: Account Id, A

相关标签:
1条回答
  • 2020-12-22 10:46

    try this in your ngOnInit function. You need dynamically create the value property.

    ngOnInit(){
      this.accdetailservice.accountdetails().subscribe(data =>
      let tempObject = data.map(obj => ({...obj, value: 0}));
      this.dataSource1.data = tempObject;
      );
     }
    
    0 讨论(0)
提交回复
热议问题