<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)="statement"html
<button (click)="deleteHero()">Delete herobutton>
傳參git
<button (click)="onSave($event)">Savebutton> <button *ngFor="let hero of heroes" (click)="deleteHero(hero)">{{hero.name}}button> <form #heroForm (ngSubmit)="onSubmit(heroForm)"> ... form>