Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added AngularJS code
  • Loading branch information
rkv14001 committed Oct 31, 2016
1 parent 93a0405 commit 911cd9e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/resources/index.html
@@ -1,12 +1,13 @@
<!doctype html>
<html class="no-js" lang="">
<html class="no-js" lang="" ng-app="studentAdmin">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.7/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.7/angular-route.js"></script>
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->

Expand All @@ -15,14 +16,20 @@
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<!-- Add your site or application content here -->
<p>Hello world! This is HTML5 Boilerplate.</p>
<nav>
<ul>
<li><a href="#/">Home</a></li>
<li><a href="#/classSearch">Class</a></li>
</ul>
</nav>

<div class="ng-view">
</div>


<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>

<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
Expand Down
21 changes: 21 additions & 0 deletions src/resources/js/main.js
@@ -0,0 +1,21 @@
var app = angular.module('studentAdmin', ['ngRoute']);


app.config(function($routeProvider) {
$routeProvider
.when("/", {
templateUrl : "tmpl/homeScreen.html",
controller: 'mainCtrl'
})
.when("/classSearch", {
templateUrl : "tmpl/dynamicClassSearch.html",
controller: "searchCtrl"
})
.otherwise( {
redirectTo: '/'
});
});

app.controller('mainCtrl', function() {});

app.controller('searchCtrl', function() {});
3 changes: 3 additions & 0 deletions src/resources/tmpl/dynamicClassSearch.html
@@ -0,0 +1,3 @@
<div>
Dynamic Class Search
</div>
3 changes: 3 additions & 0 deletions src/resources/tmpl/homeScreen.html
@@ -0,0 +1,3 @@
<div>
home
</div>

0 comments on commit 911cd9e

Please sign in to comment.