mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-18 06:15:12 +00:00
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
import { inject } from '@angular/core';
|
|
import { Routes } from '@angular/router';
|
|
import { InventoryComponent } from 'app/modules/admin/apps/ecommerce/inventory/inventory.component';
|
|
import { InventoryService } from 'app/modules/admin/apps/ecommerce/inventory/inventory.service';
|
|
import { InventoryListComponent } from 'app/modules/admin/apps/ecommerce/inventory/list/inventory.component';
|
|
|
|
export default [
|
|
{
|
|
path : '',
|
|
pathMatch : 'full',
|
|
redirectTo: 'inventory',
|
|
},
|
|
{
|
|
path : 'inventory',
|
|
component: InventoryComponent,
|
|
children : [
|
|
{
|
|
path : '',
|
|
component: InventoryListComponent,
|
|
resolve : {
|
|
brands : () => inject(InventoryService).getBrands(),
|
|
categories: () => inject(InventoryService).getCategories(),
|
|
products : () => inject(InventoryService).getProducts(),
|
|
tags : () => inject(InventoryService).getTags(),
|
|
vendors : () => inject(InventoryService).getVendors(),
|
|
},
|
|
},
|
|
],
|
|
},
|
|
] as Routes;
|