引导表中具有异步数据数组的Angular2动画

时间:2018-12-07 14:37:25

标签: angular animation asynchronous rxjs bootstrap-table

我正在尝试用角度动画显示异步数据表。 如果仅插入了新数据,则仅应将新插入的数据行从左向右滑动, 如果从数据库删除行中删除的数据需要从左到右删除。 我尝试了来自角度官方网站https://stackblitz.com/angular/vbqvbgqalxe?file=src%2Fapp%2Fhero-list-enter-leave.component.ts的示例 但是我无法仅将其应用于某些特殊行。

这是我的代码

client.component.ts

 people$: Observable<Person[]>;

 this.people$ = this.clientService.getDbData().map(res =>res);

client.component.html

  <tr *ngFor="let person of people$ | async " [style.color]="person.randomNum < person.second ? '#F61227':'#13F612'">
    <td style="width: 10%">{{person.Id}}</td>
    <td style="width: 10%">{{person.second}}</td>
    <td style="width: 10%">{{person.randomNum}}</td>
    <td style="width: 30%">{{person.name}}</td>
    <td style="width: 40%">{{person.surname}}</td>
  <tr>

0 个答案:

没有答案
相关问题