在Angular 2模板中命名数组

时间:2017-01-09 19:07:07

标签: angular

有没有更简洁的方法来写这个?

   <a *ngIf="array[some_property_exist] && array[some_property_exist].length > 0" href="array[some_property_exist] | somePipe">
     <span>{{array[some_property_exist].some_other_property</span>
   </a>

有没有办法将array[some_property_exist]别名化为模板中的变量?

0 个答案:

没有答案