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