Created
June 4, 2019 23:12
-
-
Save alexytiger/fc609cf8aa9daf95247d3d1cb9a00fc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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