-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboundToDirective.ng.html
67 lines (59 loc) · 2.34 KB
/
boundToDirective.ng.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ng-repeat for comparison</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<style>
.main-container {
width: 95%;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
}
input[type=text]{
width: 100%;
}
</style>
</head>
<body ng-app="app">
<div class="main-container">
<div ng-controller="BoundToDirectiveController as vm">
<h1>AnyTable-Data</h1>
<div class="row">
<div class="col-md-4">
<button ng-click="vm.updateSingelValue()" class="btn btn-info pull-right">Update Single Value</button>
<button class="btn btn-info pull-right" ng-click="vm.regenerate()">Cycle TableData</button>
</div>
<div class="col-md-4">
<input type="text" placeholder="i trigger a live update.." ng-model="vm.liveUpdate" class="form-control"/>
</div>
<div class="col-md-4">
<input type="text" placeholder="filter by first name (case sensitive)" ng-model="vm.filterQuery" ng-change="vm.filterTable(vm.filterQuery)" class="form-control"/>
</div>
</div>
<table class="table table-striped">
<thead>
<th ng-repeat="col in ::vm.tableViewData.cols track by $index">{{::col}}</th>
</thead>
<tbody>
<tr ng-repeat="row in vm.tableViewData.rows" >
<td ng-repeat="td in row">
<span ng-if="($first && vm.liveUpdate.length > 0)">{{vm.liveUpdate}}</span>
<span>{{td}}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/react/react.js"></script>
<script src="bower_components/react/react-dom.js"></script>
<script src="bower_components/ngreact/ngReact.min.js"></script>
<script src="app/app.js"></script>
<script src="app/components/bound-to-directive/bound-to-directive.js"></script>
</body>
</html>