Interpolation and Template Expressions
Interpolation
Current customer: {{ currentCustomer }}
{{ title }}
Evaluating template expressions
Simple evaluation (to a string):
The sum of 1 + 1 is {{ 1 + 1 }}.
Evaluates using a method (also evaluates to a string):
The sum of 1 + 1 is not {{ 1 + 1 + getVal() }}.
Expression Context
Component context, properties of app.component.ts:
{{ recommended }}
Template context, template input variables (let customer):
@for (customer of customers; track customer) {
- {{ customer.name }}
}
Template context: template reference variables (#customerInput):