This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
app-routing.module.ts 1.61 KiB
Newer Older
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { DEBUG_INFO_ENABLED } from 'app/app.constants';
import { UserRouteAccessService } from 'app/core/auth/user-route-access-service';
import { pagesRoutes } from 'app/editorialPages/pages.route';
import { Authority } from 'app/shared/constants/authority.constants';
import { DatapolicyComponent } from './layouts/datapolicy/datapolicy.component';
import { errorRoute } from './layouts/error/error.route';
import { navbarRoute } from './layouts/navbar/navbar.route';
Michael Breu's avatar
Michael Breu committed
const LAYOUT_ROUTES = [navbarRoute, ...errorRoute];
Michael Breu's avatar
Michael Breu committed
export const gitSearchRoutes = [
  {
    path: 'admin',
    data: {
      authorities: [Authority.ADMIN]
Michael Breu's avatar
Michael Breu committed
    },
    canActivate: [UserRouteAccessService],
    loadChildren: () => import('./admin/admin-routing.module').then(m => m.AdminRoutingModule)
Michael Breu's avatar
Michael Breu committed
  },
  {
    path: 'account',
    loadChildren: () => import('./account/account.module').then(m => m.AccountModule)
Michael Breu's avatar
Michael Breu committed
  },
  {
    path: 'search',
    loadChildren: () => import('app/search/search.module').then(m => m.SearchModule)
Michael Breu's avatar
Michael Breu committed
  },
  {
    path: 'bookmarks',
    loadChildren: () => import('app/bookmarks/bookmarks.module').then(m => m.BookmarskModule)
  },
  {
    path: 'datapolicy',
    component: DatapolicyComponent
Michael Breu's avatar
Michael Breu committed
  },
  {
    path: 'import',
    loadChildren: () => import('app/exercise/import/exercise-import.module').then(m => m.ExerciseImportModule)
Michael Breu's avatar
Michael Breu committed
  },
  pagesRoutes,
  ...LAYOUT_ROUTES
Michael Breu's avatar
Michael Breu committed
];
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
@NgModule({
  imports: [RouterModule.forRoot(gitSearchRoutes, { enableTracing: DEBUG_INFO_ENABLED })],
  exports: [RouterModule]
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
})
export class GitSearchV2AppRoutingModule {}