-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
34 lines (32 loc) · 1.34 KB
/
index.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
<!DOCTYPE html>
<html lang="en" ng-app="myNinjaApp">
<head>
<title>Live web Page</title>
<link href="content/css/styles.css" rel="stylesheet" type="text/css" />
<script src ="app\lib\angular.min.js"></script>
<script src="app\app.js"></script>
</head>
<body>
<header ng-include="'header.html'"></header>
<div class ="content">
<div ng-controller ="NinjaController">
<button ng-click="order = 'name'">Order by Name</button>
<button ng-click="order = 'belt'">Order by Belt</button>
<input type="text" ng-model = "search" placeholder="Search here"/>
<ul>
<li ng-repeat = "ninja in ninjas | orderBy: order | filter: search" ng-show="ninja.available">
<h3>{{ninja.name}} - {{ninja.rate |currency: '$'}}</h3>
<div class="remove" ng-click="removeNinja(ninja)">x</div>
<span class ="belt" style="background: {{ninja.belt}}">{{ninja.belt}} belt</span>
</li>
</ul>
<form ng-submit="addNinja()">
<input type ="text" placeholder ="name" ng-model="newninja.name"/>
<input type ="text" placeholder ="belt" ng-model="newninja.belt"/>
<input type ="text" placeholder ="rate" ng-model="newninja.rate"/>
<input type="submit" value = "ADD"/>
</form>
</div>
</div>
</body>
</html>