CodeZettaInterview Hub

Angular · Templates · Fresh / Intern · Concept

What are template reference variables?

Short Interview Answer

Local names (#ref) that point to a DOM element or directive/component instance in the template.

Detailed Explanation

Useful for focusing inputs or reading child APIs. Prefer ViewChild for class access. Don't overuse refs for state that belongs in the component model.

Did you know this answer?