Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { AppComponent } from './app.component';
- import { ForgotPasswordDialogComponent } from './auth/forgot-password-dialog/forgot-password-dialog.component';
- import { AuthComponent } from './auth/auth.component';
- import { NgModule } from '@angular/core';
- import { Routes, RouterModule } from '@angular/router';
- import { AuthGuard } from './auth/auth-guard.service';
- import { AppLayoutComponent } from './app-layout/app-layout.component';
- import { FileManagerComponent } from './file-manager/file-manager.component';
- const routes: Routes = [
- {
- path: '',
- redirectTo: '/dashboard',
- pathMatch: 'full'
- },
- {
- path: 'dashboard',
- component: AppLayoutComponent,
- canActivate: [AuthGuard]
- },
- {
- path: 'start',
- component: AuthComponent
- },
- {
- path: 'logout',
- component: AuthComponent
- },
- {
- path: 'zapomnialem-hasla',
- component: ForgotPasswordDialogComponent
- },
- {
- path: 'pliki',
- component: FileManagerComponent
- },
- {
- path: 'administracja',
- component: AppLayoutComponent, canActivate: [AuthGuard],
- loadChildren: () => import('./cerber.modules/administration/administration.module').then(x => x.AdministrationModule)
- },
- {
- path: 'kierowcy',
- component: AppLayoutComponent, canActivate: [AuthGuard],
- loadChildren: () => import('./cerber.modules/drivers/drivers.module').then(x => x.DriversModule)
- },
- {
- path: 'umowy', component: AppLayoutComponent, canActivate: [AuthGuard],
- loadChildren: () => import('./cerber.modules/contracts/contracts.module').then(x => x.ContractsModule)
- },
- {
- path: 'pojazdy/:vehicle',
- component: AppLayoutComponent,canActivate: [AuthGuard],
- loadChildren: () => import('./cerber.modules/vehicles/vehicles.module').then(x => x.VehiclesModule)
- },
- {
- path: 'operatorzy',
- component: AppLayoutComponent,canActivate: [AuthGuard],
- loadChildren: () => import('./cerber.modules/operators/operators.module').then(x => x.OperatorsModule)
- },
- {
- path: 'kontrole',
- component: AppLayoutComponent,canActivate: [AuthGuard],
- loadChildren: () => import('./cerber.modules/controls/controls.module').then(x => x.ControlsModule)
- },
- {
- path: '**',
- redirectTo: '/dashboard',
- pathMatch: 'full'
- }
- ];
- @NgModule({
- imports: [RouterModule.forRoot(routes)],
- exports: [RouterModule]
- })
- export class AppRoutingModule { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement