Thursday, September 7, 2017

What are Expressions in AngularJS?

AngularJS expressions are much like JavaScript expressions, placed inside HTML templates by using double braces such as: {{expression}}. AngularJS evaluates expressions and then dynamically adds the result to a web page. Like JavaScript expressions, they can contain literals, operators, and variables.
There are some valid AngularJS expressions:

{{ 1 + 2 }}

{{ x + y }}

{{ x == y }}

{{ x = 2 }}


{{ user.Id }}

No comments:

Post a Comment

What is restrict option in directive?

The restrict option in angular directive, is used to specify how a directive will be invoked in your angular app i.e. as an attribute, class...