-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (33 loc) · 1.42 KB
/
index.html
File metadata and controls
38 lines (33 loc) · 1.42 KB
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
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='index.css'/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script>
<script src='index.js'></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>
<body ng-app="angularApp">
<span ng-controller="MessageController">
<h1>Idea Box</h1>
<form ng-submit="submitText()">
<input ng-minlength="1" ng-model="searchText" placeholder="Share an Idea!" required>
</form>
<table align="center">
<!-- don't use object.likes, likes as an attribute is assumed -->
<tr ng-repeat='object in textList | orderBy:"-likes"'>
<br>
<td class="amessage">Idea # {{object.index + 1}}: {{object.text}}</td>
<td class="alike"><button ng-click='like(object)'>Like!</button></td>
<td class="adislike"><button ng-click='dislike(object)'>Dislike :(</button></td>
<td class="alikecounter">{{object.likes}} Likes</td>
</tr>
</table>
</span>
</body>
</html>