import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import {Location} from '@angular/common';

@Component({
  selector: 'app-page-not-found',
  templateUrl: './page-not-found.component.html',
  styleUrls: ['./page-not-found.component.scss']
})
export class PageNotFoundComponent implements OnInit {

  constructor(private activatedRoute: ActivatedRoute, private router: Router, private location: Location) { 
    this.activatedRoute.queryParams.subscribe(params => {
      let errorUrl = params['fromUrl'];
      this.location.replaceState(errorUrl);
    });
  }

  ngOnInit(): void {
  }

}
