feat(router): add router preloader to optimistically preload routes

This commit is contained in:
vsavkin
2016-09-16 15:08:15 -07:00
committed by Alex Eagle
parent 671f73448c
commit 5a849829c4
7 changed files with 344 additions and 14 deletions

View File

@ -317,6 +317,15 @@ export class Router {
this.currentRouterState = createEmptyState(this.currentUrlTree, this.rootComponentType);
}
/**
* @internal
* TODO: this should be removed once the constructor of the router made internal
*/
resetRootComponentType(rootComponentType: Type<any>): void {
this.rootComponentType = rootComponentType;
this.currentRouterState = createEmptyState(this.currentUrlTree, this.rootComponentType);
}
/**
* Sets up the location change listener and performs the initial navigation.
*/