forked from zafarali/learning-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path00-0-concepts.html
More file actions
21 lines (18 loc) · 821 Bytes
/
00-0-concepts.html
File metadata and controls
21 lines (18 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
<head>
<title>00-concepts</title>
<!--This script contains all the code which makes AngularJS Run on our website-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.11/angular.min.js"></script>
</head>
<body>
<h1>Data Binding</h1><br />
<!---->
<div ng-app ng-init="qty=1;cost=2"><!--Basic: This line tells us that we are initializing an Angular Application with initial data qty=1 and cost=2-->
<b>Invoice:</b>
<div>Quantity: <input type="number" ng-model="qty" required></div>
<div> Costs: <input type="number" ng-model="cost" required></div>
<!--The fields above are filled in using the initial data we declared-->
<div><b>Total:</b> {{qty*cost | currency }}</div></div><!--This expression is calculated in real time and filtered using 'currency'-->
</body>
</html>