I need to implement the functionality of removing a specific block of HTML tags from the DOM when clicked.
<tr *ngFor="let item of uploader.queue">
<th width="90%">{{ item.file.name}}({{item.file.size/1000000}} MB)</th>
<th class="text-center" width="10%">
<mat-icon (click)="item.remove()">delete</mat-icon>
</th>
</tr>
The .remove() function is functioning correctly in this block.
<tr *ngFor="let items of uploaded_files">
<th width="90%">{{uploaded_files}} </th>
<th class="text-center" width="10%">
<mat-icon (click)="items.remove()">delete</mat-icon>
</th>
</tr>
However, the .remove() function is not working as expected in this block, resulting in the following error message: _v.context.$implicit.remove is not a function(…)