Angular数据循环 *ngFor 与 条件判断 *ngif 和 *ngSwitchAngular数据循环 *ngFor 与 条件判断 *ngif 和 *ngSwitch
Angular数据循环 *ngFor 与 条件判断 *ngif 和 *ngSwitch首先,进行Angular环境的搭建和项目创建ctrl + c 结束服务1、新建模块ng g component components/home如图:2、将home模块添加到主页app.component.html,页面代码如下,没有看错,只有一行<app-home></app-home>3、Angular数据循环 *ngFor1)home.comp