-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
35 lines (31 loc) · 965 Bytes
/
Copy pathindex.html
File metadata and controls
35 lines (31 loc) · 965 Bytes
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
<!doctype html>
<html lang="en" ng-app="fruitApp">
<head>
<meta charset="UTF-8">
<title>Sidekick Angular Interview Test</title>
<script src="bower_components/angular/angular.min.js"></script>
<script src="fruitApp.js"></script>
<link rel="stylesheet" href="main.css">
</head>
<body ng-controller="fruitController">
<div ng-if="!showAlt">
<div class="fruit" ng-repeat="fruit in fruits" ng-click="fruitAlert(fruit)">
<span ng-class="{'delicious': fruit.isDelicious}">
{{fruit.name}} {{fruit.isDelicious ? 'are' : 'are not'}} delicious
</span>
</div>
</div>
<div class="alt" ng-if="showAlt">
<div class="fruit" ng-repeat="fruit in fruits" ng-click="fruitAlert(fruit)">
<span ng-class="{'delicious': fruit.isDelicious}">
{{fruit.name}} {{fruit.isDelicious ? 'are' : 'are not'}} delicious
</span>
</div>
</div>
<div>
<button name="toggleAlt" ng-click="toggleAlt()">
{{showAlt ? 'Default' : 'Alternative'}}
</button>
</div>
</body>
</html>