Template
noun
say it: “TEM-plit” /ˈtɛmplɪt/
The HTML part of an Angular component, with Angular syntax for showing data and handling events.
What is Template?
A template is the HTML part of a component, with extra Angular syntax for showing data ({{ }}), reacting to events (( )) and setting properties ([ ]).
<h2>{{ product.name }}</h2>
<img [src]="product.imageUrl" />
<button (click)="addToCart()">Add to cart</button>
In a sentence
- “The template shows {{ product.name }} inside an h2.”
Level: Novice · More Angular terms at this level
Updated