create fos/sdg components to call library components in order to use extra parameters, update submodules
This commit is contained in:
parent
89ace01826
commit
b01e3f8ca8
|
@ -8,8 +8,8 @@ const routes: Routes = [
|
||||||
{path: '', loadChildren: () => import('./home/home.module').then(m => m.HomeModule)},
|
{path: '', loadChildren: () => import('./home/home.module').then(m => m.HomeModule)},
|
||||||
{path: 'home', redirectTo: '', pathMatch: 'full'},
|
{path: 'home', redirectTo: '', pathMatch: 'full'},
|
||||||
{path: 'mail-preferences', loadChildren: () => import('./userEmailPreferences/mailPrefs.module').then(m => m.LibMailPrefsModule)},
|
{path: 'mail-preferences', loadChildren: () => import('./userEmailPreferences/mailPrefs.module').then(m => m.LibMailPrefsModule)},
|
||||||
{path: 'sdgs', loadChildren: () => import('./openaireLibrary/sdg/sdg.module').then(m => m.SdgModule)},
|
{path: 'sdgs', loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule)},
|
||||||
{path: 'fields-of-science', loadChildren: () => import('./openaireLibrary/fos/fos.module').then(m => m.FosModule), data: {extraOffset: 100}},
|
{path: 'fields-of-science', loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule), data: {extraOffset: 100}},
|
||||||
{path: 'contact-us', loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule), data: {hasQuickContact: false}},
|
{path: 'contact-us', loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule), data: {hasQuickContact: false}},
|
||||||
// ORCID Pages
|
// ORCID Pages
|
||||||
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)},
|
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)},
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import {NgModule} from "@angular/core";
|
||||||
|
import {RouterModule} from "@angular/router";
|
||||||
|
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||||
|
import {ExploreFosComponent} from "./fos.component";
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
RouterModule.forChild([
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: ExploreFosComponent,
|
||||||
|
canDeactivate: [PreviousRouteRecorder]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class LibFosRoutingModule { }
|
|
@ -0,0 +1,16 @@
|
||||||
|
import {Component} from "@angular/core";
|
||||||
|
import {properties} from "../../environments/environment";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'explore-fos',
|
||||||
|
template: `
|
||||||
|
<fos [piwikSiteId]="piwikSiteId"></fos>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
export class ExploreFosComponent {
|
||||||
|
piwikSiteId = properties.piwikSiteId;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
import {NgModule} from "@angular/core";
|
||||||
|
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||||
|
import {LibFosRoutingModule} from "./fos-routing.module";
|
||||||
|
import {FosRoutingModule} from "../openaireLibrary/fos/fos-routing.module";
|
||||||
|
import {FosModule} from "../openaireLibrary/fos/fos.module";
|
||||||
|
import {ExploreFosComponent} from "./fos.component";
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
LibFosRoutingModule,
|
||||||
|
FosRoutingModule,
|
||||||
|
FosModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
ExploreFosComponent
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
ExploreFosComponent
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
PreviousRouteRecorder
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class LibFosModule { }
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3bd6a28c1b90980135c04d6d4b52714357fa1853
|
Subproject commit 1f30f9d88aac7499585cde51fcf656466edeb7a8
|
|
@ -0,0 +1,17 @@
|
||||||
|
import {NgModule} from "@angular/core";
|
||||||
|
import {RouterModule} from "@angular/router";
|
||||||
|
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||||
|
import {ExploreSdgComponent} from "./sdg.component";
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
RouterModule.forChild([
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: ExploreSdgComponent,
|
||||||
|
canDeactivate: [PreviousRouteRecorder]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class LibSdgRoutingModule { }
|
|
@ -0,0 +1,15 @@
|
||||||
|
import {Component} from "@angular/core";
|
||||||
|
import {properties} from "../../environments/environment";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'explore-sdg',
|
||||||
|
template: `
|
||||||
|
<sdg [piwikSiteId]="piwikSiteId"></sdg>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
export class ExploreSdgComponent {
|
||||||
|
piwikSiteId = properties.piwikSiteId;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
import {NgModule} from "@angular/core";
|
||||||
|
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||||
|
import {LibSdgRoutingModule} from "./sdg-routing.module";
|
||||||
|
import {SdgRoutingModule} from "../openaireLibrary/sdg/sdg-routing.module";
|
||||||
|
import {SdgModule} from "../openaireLibrary/sdg/sdg.module";
|
||||||
|
import {ExploreSdgComponent} from "./sdg.component";
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
LibSdgRoutingModule,
|
||||||
|
SdgRoutingModule,
|
||||||
|
SdgModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
ExploreSdgComponent
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
ExploreSdgComponent
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
PreviousRouteRecorder
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class LibSdgModule { }
|
|
@ -1 +1 @@
|
||||||
Subproject commit c2bf664ce363f49f64ca5b05f3456dd902dcad5b
|
Subproject commit a1cc7cb31617c565d3ba94fae629e3e15a8e8bf9
|
Loading…
Reference in New Issue