[MonitorDashboard]: Fix a bug on app component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@57847 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
c5229ca8fb
commit
7e2704fcfe
|
@ -1,5 +1,5 @@
|
|||
import {ChangeDetectorRef, Component, OnDestroy, OnInit} from '@angular/core';
|
||||
import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
|
||||
import {ActivatedRoute, NavigationEnd, RouteConfigLoadEnd, Router} from '@angular/router';
|
||||
|
||||
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
|
||||
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
||||
|
@ -44,7 +44,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
.then(properties => {
|
||||
this.properties = properties;
|
||||
this.router.events.subscribe(event => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
if (event instanceof RouteConfigLoadEnd && event.route.path.indexOf('stakeholder') !== -1 ||
|
||||
event instanceof NavigationEnd) {
|
||||
let r = this.route;
|
||||
while (r.firstChild) {
|
||||
r = r.firstChild;
|
||||
|
|
Loading…
Reference in New Issue