-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
84 lines (66 loc) · 2.56 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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--bootstrap-->
<link rel="stylesheet" href="dist/bootstrap/css/bootstrap.min.css" />
<!--angular -->
<script src="dist/angular/angular.js"></script>
<!--import controller -->
<script src="app.controller.js"></script>
<title>AngularJs Workshop</title>
</head>
<body ng-app="myApp">
<!-- content goes here! -->
<div class="container-fluid" ng-controller="ListController as listCtrl">
<div class="row">
<div class="col-md-2">
<!-- Searchbar-->
<h3>Searchbar</h3>
<input type="text" class="form-control" ng-model="listCtrl.query"/>
<!--{{listCtrl.query}}-->
</div>
<div class="col-md-4">
<!-- List -->
<div class="list-group">
<a href="" class="list-group-item" ng-repeat="phone in listCtrl.phones | filter: listCtrl.query" ng-click="listCtrl.setSelect(phone.id, phone.age)" ng-class="{'active': listCtrl.isSelected(phone.id)}">
<h4 class="list-group-item-heading">{{phone.name}}</h4>
<p class="list-group-item-text">{{phone.snippet}}</p>
</a>
</div>
</div>
<div class="col-md-6">
<!-- Detail -->
<img src="{{listCtrl.phones[listCtrl.index].imageUrl}}" class="img-thumbnail" width="304" height="236"/>
<h1>{{listCtrl.phones[listCtrl.index].name}}</h1>
<h4>{{listCtrl.phones[listCtrl.index].snippet}}</h4>
<span>{{listCtrl.phones[listCtrl.index].carrier}}</span>
<h3>Review Section</h3>
<blockquote ng-repeat="review in listCtrl.phones[listCtrl.index].reviews">
{{review.body}}
<footer class="blockquote-footer"><cite>{{review.author}}</cite></footer>
</blockquote>
<form name="reviewForm" ng-controller="FormController as formCtrl" ng-submit="formCtrl.addReview(listCtrl.phones[listCtrl.index])">
<!-- live preview -->
<blockquote>
{{formCtrl.review.body}}
<footer class="blockquote-footer"><cite>{{formCtrl.review.author}}</cite></footer>
</blockquote>
<!-- review form -->
<fieldset class="form-group">
<textarea class="form-control" ng-model="formCtrl.review.body"></textarea>
<label>Author:</label>
<input type="email" class ="form-control" placeholder="[email protected]" ng-model="formCtrl.review.author"/>
</fieldset>
<fieldset class="form-group">
<input type="submit" class="btn btn-primary pull-right" value="Submit"/>
</fieldset>
</form>
</div>
</div>
</div>
</body>
<!--necesary for bootstraps js plugins -->
<script src="dist/jquery/jquery.min.js"></script>
<script src="dist/bootstrap/js/bootstrap.min.js"></script>
</html>