Skip to content

Instantly share code, notes, and snippets.

@alexytiger
Created June 4, 2019 23:12
Show Gist options
  • Save alexytiger/fc609cf8aa9daf95247d3d1cb9a00fc7 to your computer and use it in GitHub Desktop.
Save alexytiger/fc609cf8aa9daf95247d3d1cb9a00fc7 to your computer and use it in GitHub Desktop.
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DashboardComponent } from './core/components/dashboard/dashboard.component';
import { NotFoundPageComponent } from './core/containers/not-found-page.component';
import * as guards from './core/guards';
export const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{
path: 'dashboard',
component: DashboardComponent,
},
{
path: 'seller-booth',
// here we use the TypeScript Dynamic Imports in Angular 8
loadChildren: () => import('./seller-booth/seller-booth.module').then(mod => mod.SellerBoothModule),
canActivate: [guards.EthInitGuard],
},
{ path: '**', component: NotFoundPageComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes, { useHash: true })],
exports: [RouterModule],
})
export class AppRoutingModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment