import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'app-header-tabs-wrapper-component', templateUrl: './header-tabs-wrapper.component.html', styleUrls: ['./header-tabs-wrapper.component.scss'] }) export class HeaderTabsWrapperComponent implements OnInit { IncomingReportId : string; reportMode : string; constructor(private _route : ActivatedRoute) { this.IncomingReportId = ""; this.reportMode = ""; } ngOnInit() { this._route.params.subscribe(params => { if(params["reportId"]!== undefined && params["reportMode"]!== undefined) { this.IncomingReportId = params["reportId"]; this.reportMode = params["reportMode"]; } console.log(this.reportMode); }); } }