1.

AngularJS Expressions 2

Answer»

AngularJS Expressions 2
As from previoud chapter we knows that with the help of AngularJS we will bind data to HTML by using Expressions. There are below some of the most importants fact or we can say most important features are given below.

First POINT is that AngularJS expression can be written in between the DOUBLE braces if we not use ng-bind directives. Syntax is given below
Syntax
{{ expression }}

Second point is that if we use ng-bind directive then we need to use below syntax
Syntax
ng-bind="expression"

Third point is that result return by AngularJS expression is on same location where it is define.

Fourth point for AngularJS expression is that it is that it will contain Literals, operators and VARIABLE as same as we use for JavaScript. And there are 2 examples are given below.
Syntax
Example1:- {{ 5+3 }}
Example2:- {{ FirstName +" " +LastName }}


AngularJS Expression
One point in above example is that we have use ng-app directive as blank but if we will remove the ng-app directive then it will not resolve the expression and display this without solving this



AngularJS Without ng-app



Discussion

No Comment Found