I applied fadein
effect of Angular-Animations to my Angular project based on ASP.NET, and display only the first row faded-in. However, the other rows are not displayed when using *ngIf as shown below:
<ng-template pTemplate="body" let-row let-i="rowIndex">
<tr *ngIf="i==0" [@fadeInOnEnter]>
<td>
<a [routerLink]="['/detail/']">{{ row.Summary }}</a>
</td>
</tr>
</ng-template>
I know that else
can be used in this situation, but I do not want to repeat lots of <td>
blocks omitted in this example. So, is there a way to display animation only if the condition is true in *ngIf
field and display the same block without animation.