双花括号{{}}
<img src="{{heroImageUrl}}" style="height:30px">--> <p>The sum of 1 + 1 is {{1 + 1}}p>--> <p>The sum of 1 + 1 is not {{1 + 1 + getVal()}}p>
event binding
(event)="statement"
<button (click)="deleteHero()">Delete herobutton>
传参
<button (click)="onSave($event)">Savebutton> <button *ngFor="let hero of heroes" (click)="deleteHero(hero)">{{}}button> <form #heroForm (ngSubmit)="onSubmit(heroForm)"> ... form>