Template Reference Variable
noun
say it: “TEM-plit REF-er-ens VAIR-ee-uh-bul” /ˈtɛmplɪt ˈrɛfərəns ˈvɛriəbəl/
A #name on an element in an Angular template so other parts of the template can use it.
What is Template Reference Variable?
A template reference variable (#name) gives an element a name you can use elsewhere in the same template.
<input #city placeholder="City" />
<button (click)="lookUp(city.value)">Search</button>
In a sentence
- “The template reference variable #search lets the button read search.value.”
Level: Apprentice · More Angular terms at this level
Updated