Skip to content

Instantly share code, notes, and snippets.

@nilsandrey
Created May 19, 2021 06:25
Show Gist options
  • Save nilsandrey/e49369b54e0d8064b68ec4ced18ad4b0 to your computer and use it in GitHub Desktop.
Save nilsandrey/e49369b54e0d8064b68ec4ced18ad4b0 to your computer and use it in GitHub Desktop.
{
path: 'refresh' // See `AppComponent.watchForRefresh()`
},
// ...
this._router.events
.pipe(filter(e => e instanceof NavigationEnd))
.subscribe((e: NavigationEnd) => {
const current = e.urlAfterRedirects.substr(1);
if (current === 'refresh') {
this._location.back();
}
})
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment