brewman/overlord/src/app/product-ledger/product-ledger-routing.module.ts

50 lines
1.1 KiB
TypeScript
Raw Normal View History

import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {ProductLedgerResolver} from './product-ledger-resolver.service';
import {AuthGuard} from '../auth/auth-guard.service';
import {ProductLedgerComponent} from './product-ledger.component';
const productLedgerRoutes: Routes = [
{
path: 'ProductLedger',
component: ProductLedgerComponent,
canActivate: [AuthGuard],
data: {
permission: 'Product Ledger'
},
resolve: {
info: ProductLedgerResolver
},
runGuardsAndResolvers: 'always'
},
{
path: 'ProductLedger/:id',
component: ProductLedgerComponent,
canActivate: [AuthGuard],
data: {
permission: 'Product Ledger'
},
resolve: {
info: ProductLedgerResolver
},
runGuardsAndResolvers: 'always'
}
];
@NgModule({
imports: [
CommonModule,
RouterModule.forChild(productLedgerRoutes)
],
exports: [
RouterModule
],
providers: [
ProductLedgerResolver
]
})
export class ProductLedgerRoutingModule {
}