Text interpolation
Text interpolation
Text interpolation is the process of using data of Angular component in its corresponding template using the template expression. It is used just to display a piece of information in HTML, such as displaying a title or name.
The component is a building block of an Angular application. It consists of a TypeScript class, an HTML template, and CSS styles. The template expression is a piece of code written within double curly braces {{ }} in the Template.
Understanding Template Expression
- Template expressions are same as that of JavaScript expression excluding two set of expression:
- Expression with no usage in the template (assignement, object creation, etc.,)
- Expressions with side effects