Fix routing when notfound
This commit is contained in:
parent
f38f894dce
commit
9ccea7f635
7 changed files with 152 additions and 52 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-notfound',
|
||||
|
|
@ -6,5 +7,14 @@ import { Component } from '@angular/core';
|
|||
template: `<h1>Not Found!!!</h1>`
|
||||
})
|
||||
export class NotfoundComponent {
|
||||
|
||||
constructor(private router: Router) {
|
||||
// do set country and filename
|
||||
console.log('not found');
|
||||
this.router.navigate(['/departments']).then(
|
||||
() => {
|
||||
console.log('redirected');
|
||||
window.location.reload();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue