<div class="red">red</div> // class为red
<div [class]="red">red</div> // class为blue; 从变量red读取
//组件中
red: string = "blue";
<div (click)="go()">gogo</div>
//组件中
go() {
//...
}
<div>{{good}}</div> //<div>你好</div>
//组件中
good: string = "你好";