@@ -3,7 +3,6 @@ import {Transition} from "../transition/transition";
33import { TransitionService } from "../transition/transitionService" ;
44import { TransitionHookFn } from "../transition/interface" ;
55import { StateDeclaration , LazyLoadResult } from "../state/interface" ;
6- import { State } from "../state/stateObject" ;
76import { services } from "../common/coreservices" ;
87import { StateRule } from "../url/interface" ;
98
@@ -57,11 +56,11 @@ const lazyLoadHook: TransitionHookFn = (transition: Transition) => {
5756 }
5857
5958 // No matching state found, so let .sync() choose the best non-state match/otherwise
60- router . urlRouter . sync ( ) ;
59+ router . urlService . sync ( ) ;
6160 }
6261
6362 let promises = transition . entering ( )
64- . filter ( state => ! ! state . lazyLoad )
63+ . filter ( state => ! ! state . $$state ( ) . lazyLoad )
6564 . map ( state => lazyLoadState ( transition , state ) ) ;
6665
6766 return services . $q . all ( promises ) . then ( retryTransition ) ;
@@ -79,7 +78,7 @@ export const registerLazyLoadHook = (transitionService: TransitionService) =>
7978 * @returns A promise for the lazy load result
8079 */
8180export function lazyLoadState ( transition : Transition , state : StateDeclaration ) : Promise < LazyLoadResult > {
82- let lazyLoadFn = state . lazyLoad ;
81+ let lazyLoadFn = state . $$state ( ) . lazyLoad ;
8382
8483 // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked
8584 let promise = lazyLoadFn [ '_promise' ] ;
0 commit comments