Escolar Documentos
Profissional Documentos
Cultura Documentos
1 of 4
Privacy Policy
Home
Java
JavaEE
Frameworks
Spring
Web Services
Web
Contact
Misc
About Us
Adds
Home >> AngularJS
AngularJS - Expressions
April 10, 2016 by Mukesh Kumar at 3:47 pm
directives
And Maven
Jboss Tools Installation in Eclipse
Jboss Installation in Eclipse
Database Application Using JSF
Java Web Application With Maven
Spring HelloWorld Example Using
Eclipse And Maven
Example
HTML
ED IT
Result
<html><head><script
src="https://ajax.googleapis.com/ajax/libs
/angularjs/1.0.7/angular.min.js"></script>
</head><body><h1>AngularJSExpression
Example:</h1><divngapp>10+2=
{{10+2}}<br/>22={{22}}
<br/>10*2={{10*2}}<br
/>2/2={{2/2}}</div></body>
</html>
O N
10 + 2 = 12
2-2=0
10 * 2 = 20
2/2=1
Example:
10/9/2016 12:49 AM
2 of 4
HTML
ED IT
Result
<html><head><script
src="https://ajax.googleapis.com/ajax/libs
/angularjs/1.0.7/angular.min.js"></script>
</head><body><h1>AngularJSExpression
Example:</h1><divngapp>{{"Hello
World"}}<br/>{{100}}<br/>
{{true}}<br/>{{95/10}}</div>
</body></html>
O N
Hello World
100
true
9.5
AngularJS expression can contain variables declared via ng-init directive. Consider the example given
below.
HTML
ED IT
Result
<html><head><script
src="https://ajax.googleapis.com/ajax/libs
/angularjs/1.0.7/angular.min.js"></script>
</head><body><h1>AngularJSExpression
Example:</h1><divngapp
nginit="message='HelloWorld!';amount=
5000;rateOfInterest=12.5;duration=10;
myArr=[100,200];person={
firstName:'Mukesh',lastName
:'Kumar'}">{{(amount*
rateOfInterest*duration)/100}}<br
/>
{{myArr[1]}} <br />
O N
6250
200
Mukesh Kumar
Related Articles
1. Maven Overview
Index
10/9/2016 12:49 AM
3 of 4
We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
0 Comments
javawebtutor
Share
Recommend
Login
Sort by Best
JAVAWEBTUTOR
AngularJS - Controllers
AngularJS
Controllers------------------------What is
Controllers--------------------The controller in
Subscribe d
Privacy
Top of Page
10/9/2016 12:49 AM
4 of 4
About Us
Privacy Policy
Contact Us
javawebtutor.com 2013-2016
DISCLAIMER
Oracle & Java are registered
trademarks of Oracle and/or its
affiliates. Other names may be
trademarks of their respective
owners. javawebtutor.com is not
connected to Oracle Corporation
and is not sponsored by Oracle
Corporation.The Examples &
Tutorial provided here are for
learning purpose only. we do not
warrant the correctness of its
content. The risk from using it lies
entirely with the user.
ABOUT US
FREE
EBOOKS
javawebtutor.com is a site
dedicated to bringing you the
coolest java and related web
development tutorials and
resources.
ABOUT US
Download
ebooks.
DOWNLOAD IT
LEARN MORE
10/9/2016 12:49 AM