Skip to content

Instantly share code, notes, and snippets.

@principalweb
Created January 30, 2019 18:18
Show Gist options
  • Save principalweb/53be4da78dfd658746f2b3186a35b130 to your computer and use it in GitHub Desktop.
Save principalweb/53be4da78dfd658746f2b3186a35b130 to your computer and use it in GitHub Desktop.
App routing module
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