0
下面是我的一个html表格的代码,我需要添加一个函数,在 点击按钮上移或下移行?如何在Angular2上点击某个按钮,在表格中上下移动行?
<table class="table table-striped">
<thead class="thead">
<tr>
<th>Name</th>
<th>Key</th>
<th>Token</th>
<th>Color</th>
<th></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let value of values">
<td>
{{value.name}}
</td>
<td>
{{value.key}}
</td>
<td>
{{value.token}}
</td>
<td>
{{value.color}}
</td>
<td>
<button class="btn btn-success" (click)="editvalue(value);">edit</button> |
</td>
</tr>
</tbody>
</table>
你能帮我吗我该怎么做?感谢您的帮助。
欢迎的StackOverflow!请查看[提问问题指南](https://stackoverflow.com/help/asking),特别是[如何创建最小,完整和可验证示例](https://stackoverflow.com/help/MCVE) – AesSedai101