html文件
//条件判断:*ngIf是直接影响元素手否被渲染,而非控制元素的显示和隐藏
//*ngIf=“” html文件
falg为true
bool为false
循环语句:*ngFor
ngFor="let item of colors...">
{{item}}
Switch语句:[ngSwitch]=”变量“
ngSwitch]="isMax">
xxxxxx.component.ts文件
数据定义,事件都写在这个文件里
// component.ts文件
import { Component, OnInit } from '@angular