upgrade dependencies and migrate
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { Location } from '@angular/common';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Location } from '@angular/common'
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'app-unavailable',
|
||||
templateUrl: './unavailable.component.html'
|
||||
})
|
||||
@@ -18,8 +19,8 @@ export class UnavailableComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.route.queryParams.subscribe({
|
||||
next: (params) => {
|
||||
if (params[ 'target' ]) {
|
||||
this.targetRoute = params[ 'target' ];
|
||||
if (params['target']) {
|
||||
this.targetRoute = params['target'];
|
||||
this.router.navigate([], { queryParams: { target: null }, queryParamsHandling: 'merge', skipLocationChange: true });
|
||||
}
|
||||
}
|
||||
@@ -31,7 +32,7 @@ export class UnavailableComponent implements OnInit {
|
||||
if (!this.targetRoute || this.targetRoute === "unavailable" || this.targetRoute === "/unavailable") {
|
||||
this.location.back;
|
||||
} else {
|
||||
this.router.navigate([ this.targetRoute ]);
|
||||
this.router.navigate([this.targetRoute]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user