Angular · Junior · Question 9 of 75
What does {{ user.name }} do in a template?
- ✓Correct answer: Interpolation: inserts the value as text and updates it when it changes
- 2Inserts raw HTML from
user.name - 3Declares a template variable called
user.name
Explanation
Interpolation renders the expression as text (it is escaped, so it is safe from XSS). For HTML content you would bind [innerHTML], which Angular sanitizes.