blob: 889341e2a464759eaaff50d217dbc99ffcb32181 [file] [log] [blame]
Matteo Scandolo4eb4ccb2016-01-26 11:02:16 -08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17(function () {
Matteo Scandolo9fb53f72016-01-26 11:34:15 -080018 'use strict';
Matteo Scandolo4eb4ccb2016-01-26 11:02:16 -080019
Matteo Scandolo9fb53f72016-01-26 11:34:15 -080020 var modules = [
21 'ngRoute',
22 'ngResource',
23 'ngAnimate',
24 'cordMast',
25 'cordFoot',
26 'cordNav',
27 'cordLogin',
28 'cordHome',
29 'cordUser',
30 'cordBundle'
Matteo Scandoloc6036502016-01-26 15:17:10 -080031 ];
Matteo Scandolo4eb4ccb2016-01-26 11:02:16 -080032
Matteo Scandoloc6036502016-01-26 15:17:10 -080033 angular.module('cordGui', modules)
Matteo Scandolo9fb53f72016-01-26 11:34:15 -080034 .config(['$routeProvider', function ($routeProvider) {
35 $routeProvider
36 .when('/login', {
37 controller: 'CordLoginCtrl',
38 controllerAs: 'ctrl',
39 templateUrl: 'app/view/login/login.html'
40 })
41 .when('/home', {
42 controller: 'CordHomeCtrl',
43 controllerAs: 'ctrl',
44 templateUrl: 'app/view/home/home.html'
45 })
46 .when('/user', {
47 controller: 'CordUserCtrl',
48 controllerAs: 'ctrl',
49 templateUrl: 'app/view/user/user.html'
50 })
51 .when('/bundle', {
52 controller: 'CordBundleCtrl',
53 controllerAs: 'ctrl',
54 templateUrl: 'app/view/bundle/bundle.html'
55 })
56 .otherwise({
57 redirectTo: '/login'
58 });
59 }])
60 .controller('CordCtrl', ['$scope', '$location',
61 function ($scope, $location) {
62 $scope.shared = {
63 url: 'http://' + $location.host() + ':' + $location.port(),
64 userActivity: {}
65 };
66 $scope.page = {};
67 }]);
Matteo Scandolo4eb4ccb2016-01-26 11:02:16 -080068}());