From 911cd9e11dc082ef70c4c6bd6c7a7516ac114680 Mon Sep 17 00:00:00 2001 From: Renoj Varghese Date: Mon, 31 Oct 2016 12:09:03 -0400 Subject: [PATCH] added AngularJS code --- src/resources/index.html | 21 ++++++++++++++------- src/resources/js/main.js | 21 +++++++++++++++++++++ src/resources/tmpl/dynamicClassSearch.html | 3 +++ src/resources/tmpl/homeScreen.html | 3 +++ 4 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 src/resources/tmpl/dynamicClassSearch.html create mode 100644 src/resources/tmpl/homeScreen.html diff --git a/src/resources/index.html b/src/resources/index.html index b22fb35..f676b11 100644 --- a/src/resources/index.html +++ b/src/resources/index.html @@ -1,12 +1,13 @@ - + - + + @@ -15,14 +16,20 @@ - - -

Hello world! This is HTML5 Boilerplate.

+ + +
+
+ + diff --git a/src/resources/js/main.js b/src/resources/js/main.js index e69de29..312dc4e 100644 --- a/src/resources/js/main.js +++ b/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() {}); \ No newline at end of file diff --git a/src/resources/tmpl/dynamicClassSearch.html b/src/resources/tmpl/dynamicClassSearch.html new file mode 100644 index 0000000..dbea6b1 --- /dev/null +++ b/src/resources/tmpl/dynamicClassSearch.html @@ -0,0 +1,3 @@ +
+Dynamic Class Search +
diff --git a/src/resources/tmpl/homeScreen.html b/src/resources/tmpl/homeScreen.html new file mode 100644 index 0000000..d11f018 --- /dev/null +++ b/src/resources/tmpl/homeScreen.html @@ -0,0 +1,3 @@ +
+home +
\ No newline at end of file