-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp4.html
More file actions
36 lines (34 loc) · 2.07 KB
/
Copy pathp4.html
File metadata and controls
36 lines (34 loc) · 2.07 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
<!doctype html>
<!--Defined everything in side the html tag to be an angular view template with the
controller named MainController.-->
<html ng-app="cs142App" ng-controller="MainController">
<head>
<!-- Example of setting the page title from the controller. The template can
be an expression so we have a default value if the controller doesn't define it-->
<title>{{main.title || "CS142 Class Project"}}</title>
<!-- Add Angular -->
<script src="node_modules/angular/angular.js"></script>
<!--Include the main controller (MainController) and stylesheet -->
<script src="mainController.js"></script>
<!--<link rel="stylesheet" type="text/css" href="main.css" />-->
<!--Include the controllers and models for all the view templates we are using. Currently
that is only the example component.-->
<script src="components/example/exampleController.js"></script>
<link rel="stylesheet" type="text/css" href="components/example/example.css" />
<script src="modelData/example.js"></script>
<script src="components/states/statesController.js"></script>
<link rel="stylesheet" type="text/css" href="components/states/states.css" />
<script src="modelData/states.js"></script>
</head>
<body>
<div class="header">
</div> <!-- Your problem #1 header widget goes here-->
<!--Include the example view template in this div. This will result in the
controller (ExampleController) being started and the template inserted and
filled in into the DOM.-->
<!-->http://codepen.io/Sinetheta/pen/pgGuf/-->
<button ng-click="main.clickButton()">Switch to <span ng-if="main.buttonClicked">States</span><span ng-if="main.buttonNotClicked">Example</span> page.</button>
<div ng-if="main.buttonClicked" ng-include="'components/example/exampleTemplate.html'" ng-controller="ExampleController"></div>
<div ng-if="main.buttonNotClicked" ng-include="'components/states/statesTemplate.html'" ng-controller="StatesController"></div>
</body>
</html>