27 lines
726 B
TypeScript
27 lines
726 B
TypeScript
import { Routes } from '@angular/router';
|
|
|
|
import { authGuard } from '../auth/auth-guard.service';
|
|
import { BundleDetailComponent } from './bundle-detail/bundle-detail.component';
|
|
import { BundleListComponent } from './bundle-list/bundle-list.component';
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
component: BundleListComponent,
|
|
canActivate: [authGuard],
|
|
data: { permission: 'Products' }, // change if you have a separate permission
|
|
},
|
|
{
|
|
path: 'new',
|
|
component: BundleDetailComponent,
|
|
canActivate: [authGuard],
|
|
data: { permission: 'Products' },
|
|
},
|
|
{
|
|
path: ':id',
|
|
component: BundleDetailComponent,
|
|
canActivate: [authGuard],
|
|
data: { permission: 'Products' },
|
|
},
|
|
];
|