What is interpolation ?

-> The double-curly braces are used for interpolation ({{ and }}) in angular templates.
-> Interpolation is used to weave calculated strings into the text between HTML element tags and within attribute assignments.

-> The text between the braces is often the name of a component property. Angular replaces that name with the string value of the corresponding component property. In the example above, Angular evaluates the title and heroImageUrl properties and “fills in the blanks”, first displaying a bold application title and then a heroic image.

-> More generally, the text between the braces is a template expression that Angular first evaluates and then converts to a string.

 

Leave a Reply

Your email address will not be published. Required fields are marked *