How to sum up the values entered in the mat-table column using mat-input in angular2

后端 未结 2 1959
臣服心动
臣服心动 2021-01-18 10:17

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

2条回答
  •  野的像风
    2021-01-18 10:33

    Try a reducer:

     Total: {{dataSource1.data.reduce((summ, v) => summ += v.value, 0)}}
    

提交回复
热议问题