+ .subscribe(() => {
+ const defaultRouteConfig = this.serverService.getConfig().instance.defaultClientRoute
+
+ if (defaultRouteConfig) {
+ RedirectService.DEFAULT_ROUTE = defaultRouteConfig
+ }
+ })
+
+ // Track previous url
+ this.currentUrl = this.router.url
+ router.events.subscribe(event => {
+ if (event instanceof NavigationEnd) {
+ this.previousUrl = this.currentUrl
+ this.currentUrl = event.url
+ }
+ })
+ }
+
+ redirectToPreviousRoute () {
+ if (this.previousUrl) return this.router.navigateByUrl(this.previousUrl)