From 96094547dd793868092dda4c2699a839287fa175 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 6 Mar 2016 14:51:50 +0100 Subject: [PATCH] Add image view, controller. --- client/index.html | 1 + client/js/app.js | 8 ++++++-- client/js/controllers/image/image.js | 9 +++++++++ client/partials/home/{main.html => home.html} | 0 client/partials/image/image.html | 8 ++++++++ client/partials/menu.html | 3 ++- client/partials/network/{main.html => network.html} | 0 7 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 client/js/controllers/image/image.js rename client/partials/home/{main.html => home.html} (100%) create mode 100644 client/partials/image/image.html rename client/partials/network/{main.html => network.html} (100%) diff --git a/client/index.html b/client/index.html index 48ea4a0..a06994c 100644 --- a/client/index.html +++ b/client/index.html @@ -89,6 +89,7 @@ + diff --git a/client/js/app.js b/client/js/app.js index e2d5b9b..1602e65 100644 --- a/client/js/app.js +++ b/client/js/app.js @@ -13,12 +13,16 @@ mainApp.config(['$routeProvider', function($routeProvider){ $routeProvider. when('/home',{ - templateUrl: 'partials/home/main.html', + templateUrl: 'partials/home/home.html', controller: 'homeCtrl' }). when('/network',{ - templateUrl: 'partials/network/main.html', + templateUrl: 'partials/network/network.html', controller: 'networkCtrl' + }). + when('/image',{ + templateUrl: 'partials/image/image.html', + controller: 'imageCtrl' }).otherwise({ redirectTo: '/home' }); diff --git a/client/js/controllers/image/image.js b/client/js/controllers/image/image.js new file mode 100644 index 0000000..036dec3 --- /dev/null +++ b/client/js/controllers/image/image.js @@ -0,0 +1,9 @@ +/** + * The image controller + * + * @param {$scope} $scope The $scope service from angular + */ +mainApp.controller('imageCtrl', function ($scope) +{ + $scope.title="Test"; +}); diff --git a/client/partials/home/main.html b/client/partials/home/home.html similarity index 100% rename from client/partials/home/main.html rename to client/partials/home/home.html diff --git a/client/partials/image/image.html b/client/partials/image/image.html new file mode 100644 index 0000000..586f003 --- /dev/null +++ b/client/partials/image/image.html @@ -0,0 +1,8 @@ +
+
+ Image +
+
+ Main Content +
+
diff --git a/client/partials/menu.html b/client/partials/menu.html index dfd5842..a473fd8 100644 --- a/client/partials/menu.html +++ b/client/partials/menu.html @@ -1,4 +1,5 @@
Home Network -
\ No newline at end of file + Images + diff --git a/client/partials/network/main.html b/client/partials/network/network.html similarity index 100% rename from client/partials/network/main.html rename to client/partials/network/network.html