I'm trying to make a table in which there will be some kind of time counter for each row. i used "mat-progress-bar" with dynamic value, but i cant customise each timer for is correspondant row. what i want is when i add a row the timer must start only for the added row enter image description here
<ng-container matColumnDef="event">
<th mat-header-cell *matHeaderCellDef> Event </th>
<td mat-cell *matCellDef="let row" >
<mat-progress-bar mode="buffer" value="{{tmpRest}}"></mat-progress-bar>
</td>
</ng-container>
my component code. i delcared tmpRest:number=0
passTimer(){
let source = interval(1000)
let timer$ = timer(102000)
let tmp = source.pipe(takeUntil(timer$))
tmp.subscribe((t)=>{
this.tmpRest = 100 - t
console.log(this.tmpRest)
})
}