-
Notifications
You must be signed in to change notification settings - Fork 0
/
exercise4.html
35 lines (35 loc) · 1.09 KB
/
exercise4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<title>Angular.js bank account application</title>
</head>
<body>
<div ng-app="accountApp" ng-controller="accountController" id="container">
<header>
<h1>Angular.js bank account application</h1>
</header>
<section class="content">
<div class="col">
<form ng-submit='changeBalance(value)' id="moneyForm">
<input type="radio" ng-model='option' value='deposit'>Deposit <br>
<input type="radio" ng-model='option' value='withdraw'>Withdraw <br>
<input type="number" ng-model='value' id="moneyvalue"></input>
<input type="submit" id="submit" value="Update"></input>
</form>
</div>
<div class="col">
Balance: <div ng-bind="getBalance()" class="balance"></div>
</div>
<div class="col">
Transactions: <br>
<div ng-repeat="t in transactions track by $index" class="transactions">
{{t}}
</div>
</div>
</section>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
<script src="accountModule.js"></script>
<script src="accountController.js"></script>
</body>
</html>