Com*_*ode 1 angular2-directives angular2-template angular
如何获得角度2的索引但增加1:
<li *ngFor="let mPrepTasks of project.upcomingMeetingsPrepTask; let i= index; let count = i+ 1;">
<p>Index {{count}}</p>
</li>
Run Code Online (Sandbox Code Playgroud)
为什么不这样做:
<li *ngFor="let mPrepTasks of project.upcomingMeetingsPrepTask; let i= index;">
<p>Index {{i + 1}}</p>
</li>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3449 次 |
最近记录: |