forked from chwagssd/angular-interview-exercise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (26 loc) · 1.25 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
<html>
<head>
<link rel="stylesheet" type="text/css" href="bower_components/angular/angular-csp.css" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<script src="bower_components/angular/angular.js"></script>
</head>
<body>
<div class="app" ng-app="interviewExercise" ng-controller="genericController" data-context="I'm the guy from the outside">
<h1>I am the main set of items</h1>
<a href="#">When you click me, the function <strong>loadData within Controller.js</strong> needs to get called, and the results populated below</a>
<ul>
<li ng-if="items.length" ng-repeat="item in items">Put firstName and lastName here</li>
</ul>
<!-- Same controller, but own scope -->
<div ng-controller="genericController" data-context="I am inside, nested deep deep within">
<h2>I'm a 2nd instance of the controller</h2>
<a href="#">When you click me, the function <strong>loadData within Controller.js</strong> needs to get called, and the results populated below</a>
<ul>
<li ng-if="items.length" ng-repeat="item in items">Put firstName and lastName here</li>
</ul>
</div>
</div>
</body>
<script src="app.js"></script>
<script src="Controller.js"></script>
</html>