Last active
January 11, 2020 02:59
-
-
Save alexytiger/c7c5aa46ec4db2b37772f2f2c07d9dc4 to your computer and use it in GitHub Desktop.
e-book
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 { RouterModule, Routes } from '@angular/router'; | |
import * as fromContainers from './containers'; | |
import * as fromComponents from './components'; | |
import * as guards from './guards'; | |
const routes: Routes = [ | |
{ | |
path: '', | |
redirectTo: 'products', | |
pathMatch: 'full', | |
}, | |
{ | |
path: 'products', | |
component: fromComponents.MarketPlaceHomeComponent, | |
children: [ | |
{ | |
path: '', | |
component: fromContainers.ViewProductCollectionComponent, | |
canActivate: [guards.ProductsLoadedGuard], | |
children: [ | |
{ | |
path: ':id', | |
component: fromContainers.ViewPurchaseContractComponent, | |
}, | |
{ | |
path: '', | |
component: fromComponents.ProductDetailHomeComponent | |
}, | |
] | |
}, | |
{ | |
path: 'make/new', | |
component: fromContainers.NewPurchaseContractComponent, | |
pathMatch: 'full', | |
}, | |
] | |
} | |
]; | |
@NgModule({ | |
imports: [ | |
RouterModule.forChild(routes), | |
], | |
exports: [RouterModule] | |
}) | |
export class MarketPlaceRoutingModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment