blob: 2198535cf0bb7c50902211826130578703cb6e76 [file] [log] [blame]
/********************************************************************************
* Copyright (c) 2015-2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
import { NgModule, Component } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuard } from './authentication/authguard';
import { Role } from './authentication/authentication.service';
const appRoutes: Routes = [
{ path: 'navigator', loadChildren: './navigator-view/mdm-navigator-view.module#MDMNavigatorViewModule' },
{ path: 'administration', loadChildren: './administration/admin.module#AdminModule',
canActivate: [AuthGuard], data: { roles: [Role.Admin] } },
{ path: '', redirectTo: 'navigator', pathMatch: 'full' }
];
@NgModule({
imports: [
RouterModule.forRoot(appRoutes)
],
exports: [
RouterModule
]
})
export class AppRoutingModule {}