[Trunk|Connect]: Add scroll on router change.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56131 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
ef629531e6
commit
8eb90b98ef
|
@ -1,5 +1,5 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ActivatedRoute, NavigationStart, Router} from '@angular/router';
|
||||
|
||||
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
|
||||
import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
|
||||
|
@ -8,6 +8,7 @@ import {CommunitiesService} from "./openaireLibrary/connect/communities/communit
|
|||
import {Session} from './openaireLibrary/login/utils/helper.class';
|
||||
import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
|
||||
import {SubscribeService} from './openaireLibrary/utils/subscribe/subscribe.service';
|
||||
import {HelperFunctions} from "./openaireLibrary/utils/HelperFunctions.class";
|
||||
|
||||
// import {LayoutService} from "./openaireLibrary/services/layout.service";
|
||||
|
||||
|
@ -61,8 +62,13 @@ export class AppComponent {
|
|||
// layout = null;
|
||||
// community: {id:string, name:string, logoUrl:string};
|
||||
constructor( private route: ActivatedRoute, private propertiesService:EnvironmentSpecificService,
|
||||
private _communitiesService:CommunitiesService, private _subscribeService: SubscribeService,){//, private _layoutService: LayoutService) {
|
||||
|
||||
private _communitiesService:CommunitiesService, private _subscribeService: SubscribeService,
|
||||
private router: Router){//, private _layoutService: LayoutService) {
|
||||
router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart) {
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
Loading…
Reference in New Issue