Created
May 19, 2021 06:25
-
-
Save nilsandrey/e49369b54e0d8064b68ec4ced18ad4b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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