I have a requirement of showing details on click of every table data just below the button. On button click, it is displaying data but not beside the particular button but showing beside the first row data.
How to achieve this? Is there any better options available?
<tr *ngFor="let data of datas | search:'Name':query">
<td> <button id="button" type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo" (click)="calculateValue(data.Name,data.value)">{{data.Name}}</button>
<tr id="demo" class="collapse">
<td>
Price:{{value | number : '1.2-5'}}
</td>
</tr>
</td>
<td>{{data.LastValue | number : '1.2-8'}}</td>
<td>{{data.High | number : '1.2-8'}} </td>
</tr>