A template expression gives a value similar to any JavaScript expression. Angular executes the expression and assigns it to a property of a binding target. The target might be an HTML element, a component, or a directive. In the property binding, a template expression appears in quotes to the right of the = symbol as in [property]=”expression”. In interpolation syntax, the template expression is surrounded by double curly braces. For example, in the below interpolation, the template expression is {{username}},
{{username}}, welcome to Angular
The below JavaScript expressions are prohibited in template expression.
assignments (=, +=, -=, …)
new
chaining expressions with ; or ,
increment and decrement operators (++ and –)