AngularJS expressions contain operators,literals, and variables.
AngularJS expressions can be written inside HTML while JavaScript expressions can’t be.
AngularJS expressions do not support conditionals, loops, and exceptions.
AngularJS expressions support filters.
Expressions are written inside double curly braces. They contain variables, literals and operators.
For example: {{exp}}
{{23-19}} , {{11+89}}, {{stateName +’ ‘+cityName}}
[/html]
ng-bind:
ng-bind directive can be used to bind the innerHTML to the value returned from an expression.
Example without ng-bind:
Result: {{ a * b }}
[/html]
Example using ng-bind:
[/html]
Strings can also be used the same way:
Example without ng-bind:
Result: {{ a +’ ‘+ b }}
[/html]
Example using ng-bind:
[/html]
Example Objects without ng-bind:
Result: {{ place.city +’ ‘+ place.state }}
[/html]
Example Objects using ng-bind:
[/html]
Arrays without ng-bind:
<div ng-app=”” ng-init=”place=[‘Agra’,’Delhi’]”>
<p>Result: {{ place[0] +' '+ place[1] }}
Arrays using ng-bind:
<div ng-app=”” ng-init=”place=['Agra','Delhi']”>
<p ng-bind=”place[0] +' '+ place[1]”>
A Noun is the name of a person, place or thing. or Name of anything is noun. For example: Sita…
Misko Hevery, a Google employee, developed AngularJS. First version 1.0 of AngularJS was released in 2012. Now AngularJS is fully…
Some sentences are given below. Choose the nouns and mention the type of noun whether they are proper noun, common…
Modules are containers for appication controller. They contain different parts of an application. [html] {{ state + " " +…
Using Directives you can extend HTML attributes. In AngularJS you can define your own directives while it has its own…