d38ad750715738555353e6e17e0cecbe97f6ad7d
[releng.git] / utils / test / reporting / pages / app / scripts / config.router.js
1 'use strict'
2 /**
3  * @ngdoc function
4  * @name opnfvdashBoardAngularApp.config:config.router.js
5  * @description config of the ui router and lazy load setting
6  * config of the opnfvdashBoardAngularApp
7  */
8 angular.module('opnfvApp')
9     .run([
10         '$rootScope', '$state', '$stateParams',
11         function ($rootScope, $state, $stateParams) {
12
13             $rootScope.$state = $state;
14             $rootScope.$stateParams = $stateParams;
15
16         }
17     ]
18     ).config(['$stateProvider', '$urlRouterProvider',
19         function ($stateProvider, $urlRouterProvider) {
20
21             $urlRouterProvider.otherwise('/landingpage/table');
22
23             $stateProvider
24                 .state('landingpage', {
25                     url: "/landingpage",
26                     controller: 'MainController',
27                     templateUrl: "views/main.html",
28                     data: { pageTitle: '首页', specialClass: 'landing-page' },
29                     resolve: {
30                         controller: ['$ocLazyLoad', function ($ocLazyLoad) {
31                             return $ocLazyLoad.load([
32
33                             ])
34                         }]
35                     }
36                 })
37                 .state('landingpage.table', {
38                     url: "/table",
39                     controller:'TableController',
40                     templateUrl: "views/commons/table.html",
41                     resolve: {
42                         controller: ['$ocLazyLoad', function ($ocLazyLoad) {
43                             return $ocLazyLoad.load([
44                                 // 'scripts/controllers/table.controller.js'
45
46
47                             ])
48                         }]
49                     }
50                 })
51
52         }])
53     .run();