Explain Interpolation in Angular
Interpolation is the process of presenting a component attribute in the associated view template. We can bind any type of property into view, including string, number, date, arrays, list, or map, by using interpolation.
Interpolation is used for one-way data binding in Angular.
Angular evaluates an expression surrounded by {{ and }} and then converts a result to a string and assigns it to an element or directive property.
The process of combining data values with their representation on the page is called data binding. We can display our data to end-user by binding controls in the HTML template to the data properties of the component class.
value.component.ts
value.component.html
Evaluates an arithmetic expression, converts the result into a string.
Result in View: 2 + 2 = 4
Call Properties of Component
View / Html
Note: Except for the following, most JavaScript expressions are acceptable template expressions: - Bitwise perators for assignment, increment, and decrement (=,+=, -=, |, &, ++, -,!,?, etc.) - new, typeof, instanceof, and so forth. - chaining an expression with either; or, - using several ES2015+ operators