Angular2: what expressions can we interpolate in the template

I read that we can interpolate Javascript expressions. What is the list of valid Javascript expressions that we can interpolate? So far for interpolation, I have a displayed property, for example. object.propertyshort expressions such as {{1+1}}what other Javascript expressions can be interpolated?

+4
source share
2 answers

Expressions in Angular2 are very similar to expressions in Angular in terms of what they allow.

JavaScript expressions that promote side effects, including

  • (= + =, - =)
  • new
  • (++)

, , | &

, JavaScript , . Separation of Concerns .

https://angular.io/docs/ts/latest/guide/template-syntax.html#!#template-expressions

+3

All Articles