Created
January 30, 2019 18:18
-
-
Save principalweb/53be4da78dfd658746f2b3186a35b130 to your computer and use it in GitHub Desktop.
App routing module
This file contains 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 { AuthGuard } from './user/auth.guard'; | |
const routes: Routes = [ | |
{ path: '', loadChildren: './dashboard/dashboard.module#DashboardModule', canActivate: [AuthGuard] }, | |
{ path: 'account', loadChildren: './user/user.module#UserModule' }, | |
{ path: 'appv2/distributor/marketrecap/:org_id/:report_id/:distributor_id', | |
loadChildren: './public-report/public-report.module#PublicReportModule' }, | |
{ path: 'distributor/marketrecap/:org_id/:report_id/:distributor_id', | |
loadChildren: './public-report/public-report.module#PublicReportModule' }, | |
{ path: 'public/active-report/:type/:report_id', loadChildren: './active-report/active-report.module#ActiveReportModule' }, | |
{ path: '**', redirectTo: '' } | |
]; | |
@NgModule({ | |
imports: [RouterModule.forRoot(routes)], | |
exports: [RouterModule] | |
}) | |
export class AppRoutingModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment