import { Component, OnInit } from '@angular/core'; import {WindowService} from '../services/window.service'; import {ActivatedRoute} from '@angular/router'; @Component({ selector: 'app-something-went-wrong', templateUrl: './something-went-wrong.component.html', styleUrls: ['./something-went-wrong.component.scss'] }) export class SomethingWentWrongComponent implements OnInit { public errorDetails: string | undefined; public errorId: string | undefined; constructor(private windowService: WindowService, private route: ActivatedRoute) { } ngOnInit(): void { this.route.queryParams.subscribe((params) => { this.errorDetails = params?.errorMessage; this.errorId = params?.errorId; }); } onReloadButtonClick(): void { this.windowService.nativeWindow().location.href = this.windowService.nativeWindow().location.pathname; } }