-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute.js
26 lines (26 loc) · 835 Bytes
/
route.js
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
/**
* Created on 20171106.
* Angular 路由配置文件
*/
define(['app',
'index.ctrl',
'frame/menu/menu.ctrl'
], function (app) {
'use strict';
return app.config(['$urlRouterProvider', '$stateProvider',
function ($urlRouterProvider, $stateProvider) {
var userPath = 'components/';
$urlRouterProvider.when("/","/main").otherwise("/main");
$stateProvider.state("main",{
url:"/main",
templateUrl:userPath+"main/main.html",
controller:"mainCtrl",
resolve:{
loadCommunity:['$ocLazyLoad',function($ocLazyLoad){
return $ocLazyLoad.load([
userPath + 'main/module.js']);
}]
}
})
}]);
});