SHARE
TWEET

Untitled

a guest Jan 24th, 2020 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { AppComponent } from './app.component';
  2. import { ForgotPasswordDialogComponent } from './auth/forgot-password-dialog/forgot-password-dialog.component';
  3. import { AuthComponent } from './auth/auth.component';
  4. import { NgModule } from '@angular/core';
  5. import { Routes, RouterModule } from '@angular/router';
  6. import { AuthGuard } from './auth/auth-guard.service';
  7. import { AppLayoutComponent } from './app-layout/app-layout.component';
  8. import { FileManagerComponent } from './file-manager/file-manager.component';
  9.  
  10.  
  11. const routes: Routes = [
  12.   {
  13.     path: '',
  14.     redirectTo: '/dashboard',
  15.     pathMatch: 'full'
  16.   },
  17.   {
  18.     path: 'dashboard',
  19.     component: AppLayoutComponent,
  20.     canActivate: [AuthGuard]
  21.   },
  22.   {
  23.     path: 'start',
  24.     component: AuthComponent
  25.   },
  26.   {
  27.     path: 'logout',
  28.     component: AuthComponent
  29.   },
  30.   {
  31.     path: 'zapomnialem-hasla',
  32.     component: ForgotPasswordDialogComponent
  33.   },
  34.   {
  35.     path: 'pliki',
  36.     component: FileManagerComponent
  37.   },
  38.   {
  39.     path: 'administracja',
  40.     component: AppLayoutComponent, canActivate: [AuthGuard],
  41.     loadChildren: () => import('./cerber.modules/administration/administration.module').then(x => x.AdministrationModule)
  42.   },
  43.   {
  44.     path: 'kierowcy',
  45.     component: AppLayoutComponent, canActivate: [AuthGuard],
  46.     loadChildren: () => import('./cerber.modules/drivers/drivers.module').then(x => x.DriversModule)
  47.   },
  48.   {
  49.     path: 'umowy', component: AppLayoutComponent, canActivate: [AuthGuard],
  50.     loadChildren: () => import('./cerber.modules/contracts/contracts.module').then(x => x.ContractsModule)
  51.   },
  52.   {
  53.     path: 'pojazdy/:vehicle',
  54.     component: AppLayoutComponent,canActivate: [AuthGuard],
  55.     loadChildren: () => import('./cerber.modules/vehicles/vehicles.module').then(x => x.VehiclesModule)
  56.   },
  57.   {
  58.     path: 'operatorzy',
  59.     component: AppLayoutComponent,canActivate: [AuthGuard],
  60.     loadChildren: () => import('./cerber.modules/operators/operators.module').then(x => x.OperatorsModule)
  61.   },
  62.   {
  63.     path: 'kontrole',
  64.     component: AppLayoutComponent,canActivate: [AuthGuard],
  65.     loadChildren: () => import('./cerber.modules/controls/controls.module').then(x => x.ControlsModule)
  66.   },
  67.   {
  68.     path: '**',
  69.     redirectTo: '/dashboard',
  70.     pathMatch: 'full'
  71.   }
  72. ];
  73.  
  74. @NgModule({
  75.   imports: [RouterModule.forRoot(routes)],
  76.   exports: [RouterModule]
  77. })
  78. export class AppRoutingModule { }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top