[Admin|Trunk]: Fix menu issus like connect.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56550 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-07-15 12:32:41 +00:00
parent 391bdf290b
commit e7e539183a
1 changed files with 12 additions and 10 deletions

View File

@ -39,6 +39,16 @@ export class AppComponent implements OnInit{
private propertiesService: EnvironmentSpecificService,
private _communitiesService: CommunitiesService,
private router: Router) {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart) {
HelperFunctions.scroll();
if(event.url === '/') {
this.wellcome = true;
} else {
this.wellcome = false;
}
}
});
}
ngOnInit() {
@ -58,15 +68,8 @@ export class AppComponent implements OnInit{
this.isPortalAdministrator = Session.isPortalAdministrator();
}
this._communitiesService.updateCommunities(this.properties, this.properties.communityAPI + 'communities');
this.router.events.forEach((event) => {
if(event instanceof RoutesRecognized) {
HelperFunctions.scroll();
if(event.url === '/') {
this.wellcome = true;
} else {
this.wellcome = false;
}
this.communityId = (event.state.root.firstChild.queryParams['communityId']) ? event.state.root.firstChild.queryParams['communityId'] : '';
this.route.queryParams.subscribe(params => {
this.communityId = (params['communityId']) ? params['communityId'] : '';
this.communityType = null;
this.menuItems = [];
@ -143,7 +146,6 @@ export class AppComponent implements OnInit{
}
}
);
}
});
});
}