Angular JS Expression Example 1
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<h2>Angular Js Expression Example 1</h2>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
<div ng-app="">
<p>Angular JS Expression : {{
15 + 5 }}</p>
</div>
</body>
</html>Output Example 1
Angular JS Expression Example 2
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Angular Js Expression example 2</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
<div ng-app="">
<div ng-init="item=3;price=5">
<p>Total Price: {{item * price}}</p>
</div>
</div>
</body>
</html>Output Example 2
Angular JS Expression Example 3
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Angular Js Expression example 3</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
<div ng-app="">
<div ng-init="city='Delhi';country='India'">
<p>String Concat Example : {{city +" "+ country}}</p>
</div>
</div>
</body>
</html>Output Example 2
Angular Js Expression Example 4
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Angular Js Expression example 4</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
<div ng-app="">
<div ng-init="Emplyee =
{FirstName:'XYZ',LastName:'ABC',EmployeeId:101}">
<p>Hello {{Emplyee.FirstName + " " + Emplyee.LastName}}!</p>
<p>Your Emaployee Id is: {{Emplyee.EmployeeId}}</p>
</div>
</div>
</body>
</html>Output Example 4
Hello XYZ ABC!
Your Emaployee Id is: 101
0 comments:
Post a comment