-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.ctp
executable file
·46 lines (37 loc) · 1.15 KB
/
view.ctp
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
<html ng-app="myapp" lang="en">
<head>
<meta charset="utf-8">
<link href="/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular-route.min.js"></script>
<title>Keywords</title>
<script>
var app = angular.module('myapp',[]);
app.controller('KeywordsController',function($scope,$http){
$http.get('/keywords/view').success(function(data){
console.log("success");
console.log(data);
$scope.keywords = data;
});
})
</script>
</head>
<body>
<div class="navbar navbar-default" id="navbar">
<div class="container" id="navbar-container">
<div class="navbar-header">
<h3>Keywords</h3>
</div>
</div>
</div>
<div ng-controller="KeywordsController">
<div class="container">
<table class="table table-striped table-bordered">
<tbody>
<tr ng-repeat = "key in keywords track by $index">
<td>{{ key.Keyword }}</td>
</tr>
</tbody>
</table>
</div>
</div>