app-routing.module.ts 1.39 KB
Newer Older
Ooh-Ao committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
/* eslint-disable camelcase */
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { FullLayoutComponent } from './shared/layout-components/full-layout/full-layout.component';
import { content } from './shared/routes/fullroutes';
import { COUNTENT_ROUTES } from './shared/routes/custom-routes';
import { CustomLayoutComponent } from './shared/layout-components/custom-layout/custom-layout.component';
import { ContentLayoutComponent } from './shared/layout-components/content-layout/content-layout.component';
import { Pages } from './shared/routes/content-routes';
import { Error404Component } from './components/authentication/errorpages/error404/error404.component';

const routes: Routes = [
  { path: '', redirectTo: 'auth/login', pathMatch: 'full' },
  {
    path: '',
    loadChildren: () =>
      import('./authentication/authentication.module').then(
        (m) => m.AuthenticationModule
      ),
  },
  {
    path: '',
    component: FullLayoutComponent,
    children: content,
  },
  { path: '', component: CustomLayoutComponent, children: COUNTENT_ROUTES },
  { path: '', component: ContentLayoutComponent, children: Pages },
  { path: '**', component: Error404Component },
];

@NgModule({
Ooh-Ao committed
32
  imports: [RouterModule.forRoot(routes, { initialNavigation: 'enabledNonBlocking', useHash: true })],
Ooh-Ao committed
33 34 35 36 37
  exports: [RouterModule]
})
export class AppRoutingModule {

}