标签:
Let‘s see how to track index when we use ‘ngFor:
<li *ngFor="#hero of heros | async, #i = index"> <hero-item [hero]="hero" (changed)="thisHero = $event;" [index]="i"></hero-item> </li>
#i = index, simple as that :)
标签:
原文地址:http://www.cnblogs.com/Answer1215/p/5361916.html