【发布时间】:2017-02-09 17:15:03
【问题描述】:
我正在尝试使用 angular 2 创建一个应用程序;我想在 *ngFor 中呈现最后一个元素时,执行一个函数,像这样,标签是<img>:
<img *ngFor="let image of template.previewImages; let i = index" [src]="image" [class.hs_visible]="i==0" />
函数名是
animation(){console.log('enter');}
【问题讨论】: