Angular - 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.

How to use Text Interpolation?

As discussed earlier, we write the template expression inside double curly braces to use Text Interpolation. It is shown below for the reference −

{{