04Angular 指令(循环)

循环指令

  *ngFor

  语法:<any *ngFor="let tmp of  list "></any>

demo03.component.ts

  

app.component.ts

  

app.module.ts

    

 当不使用*ngFor时,

  

注意template模板解析要加双引号 {{ }}

循环指令②

 

原文地址:https://www.cnblogs.com/shanlu0000/p/12199245.html