Project

General

Profile

1
import { NgModule } from '@angular/core';
2
import { RouterModule } from '@angular/router';
3

    
4
import{OpenaireSearchDatasetsComponent} from './searchDatasets.component';
5
import { EnvironmentSpecificResolver} from '../../openaireLibrary/utils/properties/environmentSpecificResolver';
6

    
7
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
8
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
9
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
10

    
11

    
12

    
13
@NgModule({
14
  imports: [
15
    RouterModule.forChild([
16
     	{ path: '', component: OpenaireSearchDatasetsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
17
          redirect: '/error',  community : 'openaire'
18
        }, canDeactivate: [PreviousRouteRecorder] , resolve: { envSpecific: EnvironmentSpecificResolver  }},
19

    
20
    ])
21
  ]
22
})
23
export class SearchDatasetsRoutingModule { }
(4-4/21)