diff options
Diffstat (limited to 'client/js')
| -rw-r--r-- | client/js/app.js | 17 | ||||
| -rw-r--r-- | client/js/controllers/home.js | 10 | ||||
| -rw-r--r-- | client/js/controllers/main.js | 10 | ||||
| -rw-r--r-- | client/js/controllers/network.js | 10 |
4 files changed, 36 insertions, 11 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 diff --git a/client/js/controllers/home.js b/client/js/controllers/home.js new file mode 100644 index 0000000..d4e1b0e --- /dev/null +++ b/client/js/controllers/home.js @@ -0,0 +1,10 @@ +/* + * home Controller + */ + + + +mainApp.controller('homeCtrl', function ($scope) +{ + $scope.test="Home view"; +});
\ No newline at end of file diff --git a/client/js/controllers/main.js b/client/js/controllers/main.js deleted file mode 100644 index 78d5849..0000000 --- a/client/js/controllers/main.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * mainApp Controller - */ - - - -mainApp.controller('mainCtrl', function ($scope) -{ - $scope.test="Test title"; -});
\ No newline at end of file diff --git a/client/js/controllers/network.js b/client/js/controllers/network.js new file mode 100644 index 0000000..c2a9794 --- /dev/null +++ b/client/js/controllers/network.js @@ -0,0 +1,10 @@ +/* + * network Controller + */ + + + +mainApp.controller('networkCtrl', function ($scope) +{ + $scope.test="Network View"; +});
\ No newline at end of file |
