summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/pages/app/scripts/config.router.js
blob: 641ea6a74ded7bbbcc12e8ee7b00c8b6c2e758da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'use strict'
/**
 * @ngdoc function
 * @name opnfvdashBoardAngularApp.config:config.router.js
 * @description config of the ui router and lazy load setting
 * config of the opnfvdashBoardAngularApp
 */
angular.module('opnfvApp')
    .run([
        '$rootScope', '$state', '$stateParams',
        function ($rootScope, $state, $stateParams) {

            $rootScope.$state = $state;
            $rootScope.$stateParams = $stateParams;

        }
    ]
    ).config(['$stateProvider', '$urlRouterProvider',
        function ($stateProvider, $urlRouterProvider) {

            $urlRouterProvider.otherwise('/landingpage/table');

            $stateProvider
                .state('landingpage', {
                    url: "/landingpage",
                    //controller: 'MainCtrl',
                    templateUrl: "views/main.html",
                    data: { pageTitle: '首页', specialClass: 'landing-page' },
                    resolve: {
                        controller: ['$ocLazyLoad', function ($ocLazyLoad) {
                            return $ocLazyLoad.load([

                            ])
                        }]
                    }
                })
                .state('landingpage.table', {
                    url: "/table",
                    controller:'TableController',
                    templateUrl: "views/commons/table.html",
                    resolve: {
                        controller: ['$ocLazyLoad', function ($ocLazyLoad) {
                            return $ocLazyLoad.load([
                                // 'scripts/controllers/table.controller.js'


                            ])
                        }]
                    }
                })

        }])
    .run();