diff --git a/explore/src/app/app-routing.module.ts b/explore/src/app/app-routing.module.ts index c80bfa01..74b6aa3a 100644 --- a/explore/src/app/app-routing.module.ts +++ b/explore/src/app/app-routing.module.ts @@ -1,5 +1,5 @@ import {NgModule} from '@angular/core'; -import {RouterModule, Routes} from '@angular/router'; +import {PreloadAllModules, RouterModule, Routes} from '@angular/router'; import {OpenaireErrorPageComponent} from './error/errorPage.component'; import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver.component"; @@ -116,7 +116,11 @@ const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], + imports: [RouterModule.forRoot(routes, { + preloadingStrategy: PreloadAllModules, + onSameUrlNavigation: "reload", + relativeLinkResolution: 'corrected' + })], exports: [RouterModule] }) export class AppRoutingModule { diff --git a/explore/src/app/app.component.ts b/explore/src/app/app.component.ts index d971e853..b13cd031 100644 --- a/explore/src/app/app.component.ts +++ b/explore/src/app/app.component.ts @@ -13,6 +13,7 @@ import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component import {Subscriber} from "rxjs"; import {Meta} from "@angular/platform-browser"; import {properties} from "../environments/environment"; +import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll"; @Component({ //changeDetection: ChangeDetectionStrategy.Default, @@ -43,9 +44,7 @@ import {properties} from "../environments/environment"; - ` - }) export class AppComponent { isClient: boolean = false; @@ -59,7 +58,7 @@ export class AppComponent { subscriptions = []; constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, - private router: Router, private userManagementService: UserManagementService, + private router: Router, private userManagementService: UserManagementService, private smoothScroll: SmoothScroll, private configurationService: ConfigurationService, private _meta: Meta) { this.userMenuItems.push(new MenuItem("", "My profile", "", "", false, [], [], {})); this.userMenuItems.push(new MenuItem("", "My ORCID links", "", "/my-orcid-links", false, [], [""], {})); @@ -106,6 +105,7 @@ export class AppComponent { }); this.configurationService.clearSubscriptions(); this.userManagementService.clearSubscriptions(); + this.smoothScroll.clearSubscriptions(); } buildMenu() { diff --git a/explore/src/index.beta.html b/explore/src/index.beta.html index ed23db7a..852af9a2 100644 --- a/explore/src/index.beta.html +++ b/explore/src/index.beta.html @@ -46,19 +46,16 @@ Search OpenAIRE - - +
- -
- - - + + + diff --git a/explore/src/index.html b/explore/src/index.html index ed23db7a..1e7b3d01 100644 --- a/explore/src/index.html +++ b/explore/src/index.html @@ -1,6 +1,6 @@ - + - Search OpenAIRE - - - - -
- - -
- - - - + + +
+ +
+ + + diff --git a/explore/src/index.prod.html b/explore/src/index.prod.html index 63111496..c0fd1493 100644 --- a/explore/src/index.prod.html +++ b/explore/src/index.prod.html @@ -49,19 +49,16 @@ Search OpenAIRE - - +
- -
- - - + + +