This time i need help about how to delete a row based the row ID in html-table when delete button clicked. The table data source is from a separated Json file.
The table looks like this : Image Link
<div class="container">
<table border=1 class="table">
<tr>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Age</th>
<th>Phone</th>
</tr>
<tr *ngFor="let d of data | async" [attr.id]="d.id"> <!--each row id == id-->
<td>{{ d.id }}</td>
<td>{{ d.name }}</td>
<td>{{ d.email }}</td>
<td>{{ d.age }}</td>
<td>{{ d.phone }}</td>
<button id="remove">DELETE ROW</button>
</tr>
</table>
</div>
Please let me know if more snippets are needed. Thank you.