Skip to content

Instantly share code, notes, and snippets.

@nathan-lapinski
Created November 10, 2018 14:07
Show Gist options
  • Save nathan-lapinski/8f0ea3b16a70428a20bb3ae056f4b74d to your computer and use it in GitHub Desktop.
Save nathan-lapinski/8f0ea3b16a70428a20bb3ae056f4b74d to your computer and use it in GitHub Desktop.
preloading on nav
setUpPreloading(): void {
this.subscription =
this.router.events
.pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))
.subscribe(() => {});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment