[explore|Trunk]

add route "search/result" and landing component as a generic result landng



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@58177 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-03-04 14:31:08 +00:00
parent 1d463ab472
commit 6473a8a131
4 changed files with 50 additions and 0 deletions

View File

@ -16,6 +16,7 @@ const routes: Routes = [
{ path: 'mail-preferences', loadChildren: './userEmailPreferences/mailPrefs.module#LibMailPrefsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'mail-preferences', loadChildren: './userEmailPreferences/mailPrefs.module#LibMailPrefsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
// Landing Pages // Landing Pages
{ path: 'search/result', loadChildren: './landingPages/result/libResult.module#LibResultModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OpenaireResultComponent} from './result.component';
import {ResultRoutingModule} from './result-routing.module';
import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module";
@NgModule({
imports: [ResultRoutingModule, ResultLandingModule],
declarations:[OpenaireResultComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireResultComponent]
})
export class LibResultModule { }

View File

@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import {OpenaireResultComponent } from './result.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireResultComponent, canActivate: [FreeGuard], data: {
redirect: '/error', community : 'openaire'
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class ResultRoutingModule { }

View File

@ -0,0 +1,17 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-publication',
template: `<result-landing type="result" [activeTab]="'References'"></result-landing>`,
})
export class OpenaireResultComponent{
constructor ( ) {
}
ngOnInit() {
}
}