# Template variables Template variables help you use data from one part of a template in another part of the template. Use template variables to perform tasks such as respond to user input or finely tune your application's forms. A template variable can refer to the following: * a DOM element within a template * a directive * an element * [TemplateRef](api/core/TemplateRef) * a web component
See the for a working example containing the code snippets in this guide.
## Syntax In the template, you use the hash symbol, `#`, to declare a template variable. The following template variable, `#phone`, declares a `phone` variable on an `` element. Refer to a template variable anywhere in the component's template. Here, a `