feat(router): add router-level events for GuardsCheck and Resolve (#17601)

This commit is contained in:
Jason Aden
2017-07-01 10:30:17 -07:00
committed by GitHub
parent b479ed9407
commit 8a1a989a1c
7 changed files with 246 additions and 30 deletions

View File

@ -96,6 +96,9 @@ export class RouterPreloader implements OnDestroy {
return this.processRoutes(ngModule, this.router.config);
}
// TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
// this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
// should be refactored.
ngOnDestroy(): void { this.subscription.unsubscribe(); }
private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {