import { Component , OnInit , Input } from '@angular/core' ; import { ActivatedRoute , Route , Router } from "@angular/router" ; @ Component ( { selector : 'app-panel-header' , templateUrl : './panel-header.component.html' , styleUrls : [ './panel-header.component.scss' ] } ) export class PanelHeaderComponent implements OnInit { constructor ( private router , private route ) { } @ Input ( ) returnLink ; @ Input ( ) header ; ngOnInit ( ) { } goBack ( ) { this . router . navigate ( [ this . returnLink ] , { relativeTo : this . route } ) ; } }