@@ -4,18 +4,18 @@ import {StatesModule, RootModule} from "./uiRouterNgModule";
4
4
import { Injector } from "@angular/core" ;
5
5
import { isDefined } from "ui-router-core" ;
6
6
7
- export function applyModuleConfig ( uiRouter : UIRouter , injector : Injector , options : StatesModule = { } ) : StateObject [ ] {
8
- if ( isFunction ( options . config ) ) {
9
- options . config ( uiRouter , injector , options ) ;
7
+ export function applyModuleConfig ( uiRouter : UIRouter , injector : Injector , module : StatesModule = { } ) : StateObject [ ] {
8
+ if ( isFunction ( module . config ) ) {
9
+ module . config ( uiRouter , injector , module ) ;
10
10
}
11
11
12
- let states = options . states || [ ] ;
12
+ let states = module . states || [ ] ;
13
13
return states . map ( state => uiRouter . stateRegistry . register ( state ) ) ;
14
14
}
15
15
16
- export function applyRootModuleConfig ( uiRouter : UIRouter , injector : Injector , config : RootModule ) {
17
- isDefined ( config . deferIntercept ) && uiRouter . urlService . deferIntercept ( config . deferIntercept ) ;
18
- isDefined ( config . otherwise ) && uiRouter . urlService . rules . otherwise ( config . otherwise ) ;
16
+ export function applyRootModuleConfig ( uiRouter : UIRouter , injector : Injector , module : RootModule ) {
17
+ isDefined ( module . deferIntercept ) && uiRouter . urlService . deferIntercept ( module . deferIntercept ) ;
18
+ isDefined ( module . otherwise ) && uiRouter . urlService . rules . otherwise ( module . otherwise ) ;
19
19
}
20
20
21
21
0 commit comments