summaryrefslogtreecommitdiff
path: root/client/js/app.js
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-01-24 19:19:32 +0100
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-01-24 19:19:32 +0100
commit5466ce78f00038e742ef2a108c755f57ede451f5 (patch)
tree3e24eb1ace7e97382189eab1441bf52d60124925 /client/js/app.js
parenta059014b1bb87fe18f3079c4ab1dfefc728a0e34 (diff)
Add angular-route
Diffstat (limited to 'client/js/app.js')
-rw-r--r--client/js/app.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/client/js/app.js b/client/js/app.js
index 63ecfef..7fedb32 100644
--- a/client/js/app.js
+++ b/client/js/app.js
@@ -1,3 +1,18 @@
// Declare main app
-var mainApp=angular.module("mainApp",[]); \ No newline at end of file
+var mainApp=angular.module("mainApp",['ngRoute']);
+
+
+mainApp.config(['$routeProvider', function($routeProvider){
+ $routeProvider.
+ when('/home',{
+ templateUrl: 'partials/home.html',
+ controller: 'homeCtrl'
+ }).
+ when('/network',{
+ templateUrl: 'partials/network.html',
+ controller: 'networkCtrl'
+ }).otherwise({
+ redirectTo: '/home'
+ });
+}]); \ No newline at end of file