You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
849 B
TypeScript
33 lines
849 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
|
|
import { Subject } from 'rxjs';
|
|
import { takeUntil } from 'rxjs/operators';
|
|
import { faTimes } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
@Component({
|
|
selector: 'rtl-error',
|
|
templateUrl: './error.component.html'
|
|
})
|
|
export class ErrorComponent implements OnInit {
|
|
|
|
error = { errorCode: '', errorMessage: '' };
|
|
public faTimes = faTimes;
|
|
private unsubs: Array<Subject<void>> = [new Subject(), new Subject()];
|
|
|
|
constructor(private activatedRoute: ActivatedRoute, private router: Router) { }
|
|
|
|
ngOnInit() {
|
|
this.activatedRoute.paramMap.
|
|
pipe(takeUntil(this.unsubs[0])).
|
|
subscribe((data) => {
|
|
this.error = window.history.state;
|
|
});
|
|
}
|
|
|
|
goToHelp(): void {
|
|
this.router.navigate(['/help']);
|
|
}
|
|
|
|
}
|