Revision 60927
Added by Konstantinos Triantafyllou almost 3 years ago
app.component.ts | ||
---|---|---|
18 | 18 |
import {LoginErrorCodes} from "./openaireLibrary/login/utils/guardHelper.class"; |
19 | 19 |
import {CustomizationOptions} from "./openaireLibrary/connect/community/CustomizationOptions"; |
20 | 20 |
import {LayoutService} from "./openaireLibrary/services/layout.service"; |
21 |
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll"; |
|
21 | 22 |
|
22 | 23 |
@Component({ |
23 | 24 |
//changeDetection: ChangeDetectionStrategy.Default, |
... | ... | |
102 | 103 |
subscriptions = []; |
103 | 104 |
layout: CustomizationOptions = null; |
104 | 105 |
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, |
105 |
private _communitiesService: CommunitiesService, |
|
106 |
private _communitiesService: CommunitiesService, private smoothScroll: SmoothScroll,
|
|
106 | 107 |
private router: Router, private userManagementService: UserManagementService, |
107 | 108 |
private configurationService: ConfigurationService, private _communityService: CommunityService, private _layoutService: LayoutService) { |
108 |
this.subscriptions.push(router.events.forEach((event) => { |
|
109 |
if (event instanceof NavigationStart) { |
|
110 |
HelperFunctions.scroll(); |
|
111 |
} |
|
112 |
})); |
|
113 | 109 |
} |
114 | 110 |
|
115 | 111 |
ngOnDestroy() { |
... | ... | |
122 | 118 |
this.userManagementService.clearSubscriptions(); |
123 | 119 |
this.configurationService.clearSubscriptions(); |
124 | 120 |
this._communityService.clearSubscriptions(); |
121 |
this.smoothScroll.clearSubscriptions(); |
|
125 | 122 |
} |
126 | 123 |
|
127 | 124 |
ngOnInit() { |
Also available in: Unified diff
[Connect | Trunk]: Add smooth scroll service