AngularJS Expressions (#20839)

* AngularJS Expressions

* fixed formatting and removed redundancy
This commit is contained in:
ArshSran
2018-11-03 18:08:59 -06:00
committed by Christopher McCormack
parent dac0ccfe2a
commit f250a9bab7

View File

@ -7,6 +7,17 @@ title: AngularJS
It reduces the repetitive use of HTML code. This repetition can be avoided by using the directives provided by AngularJS which saves It reduces the repetitive use of HTML code. This repetition can be avoided by using the directives provided by AngularJS which saves
much time and effort. much time and effort.
## AngularJS Expressions
- Expressions can be written inside double braces: `{{ expression }}`
- Expressions can also be written inside a directive: `ng-bind="expression"`
- AngularJS will resolve the expression, and return the result exactly where the expression is written
- Expressions are much like JavaScript expressions: They can contain literals, operators, and variables.
Example:
```js
{{ 5 + 5 }} or {{ firstName + " " + lastName }}
```
**Install**: **Install**:
npm: npm: