Open puddlejumper26 opened 4 years ago
e.g. src, hero, and ngClass in the following
<img [src]="heroImageUrl"> <app-hero-detail [hero]="currentHero"></app-hero-detail> <div [ngClass]="{'special': isSpecial}"></div>
e.g. click, deleteRequest, and myClick in the following
<button (click)="onSave()">Save</button> <app-hero-detail (deleteRequest)="deleteHero()"></app-hero-detail> <div (myClick)="clicked=$event" clickable>click me</div>
e.g.
<input [(ngModel)]="name">
Here needs to import FormsModule in the Module.
-Attribute
<button [attr.aria-label]="help">help</button>
<div [class.special]="isSpecial">Special</div>
<button [style.color]="isSpecial ? 'red' : 'green'">
[1] https://angular.io/guide/template-syntax#binding-types-and-targets
Property
e.g. src, hero, and ngClass in the following
Event
e.g. click, deleteRequest, and myClick in the following
Two-way
e.g.
Here needs to import FormsModule in the Module.
Attribute
-Attribute
e.g.
Class
e.g.
Style
e.g.
Reference
[1] https://angular.io/guide/template-syntax#binding-types-and-targets