import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { DashboardComponent } from './components/dashboard/dashboard.component'; import { ViewProductsComponent } from './components/view-products/view-products.component'; import { BulkEditComponent } from './components/bulk-edit/bulk-edit.component'; import { ImportProductsComponent } from './components/import-products/import-products.component'; import { ExportProductsComponent } from './components/export-products/export-products.component'; import { ViewCouponCodeComponent } from './components/view-coupon-code/view-coupon-code.component'; import { CreateCouponCodeComponent } from './components/create-coupon-code/create-coupon-code.component'; import { ViewBulkDiscountsComponent } from './components/view-bulk-discounts/view-bulk-discounts.component'; import { ViewQuantityDiscountComponent } from './components/view-quantity-discount/view-quantity-discount.component'; import { OrdersComponent } from './components/orders/orders.component'; import { GeneralComponent } from './components/general/general.component'; import { ShippingComponent } from './components/shipping/shipping.component'; import { CreateShippingProfileComponent } from './components/create-shipping-profile/create-shipping-profile.component'; import { TaxedComponent } from './components/taxed/taxed.component'; import { TaxCountryComponent } from './components/tax-country/tax-country.component'; import { ViewAllProductsComponent } from './components/view-products/view-all-products/view-all-products.component'; import { ViewFeaturedComponent } from './components/view-products/view-featured/view-featured.component'; import { ViewOutStockComponent } from './components/view-products/view-out-stock/view-out-stock.component'; import { ViewVisibleComponent } from './components/view-products/view-visible/view-visible.component'; import { ViewNotVisibleComponent } from './components/view-products/view-not-visible/view-not-visible.component'; import { CreateBulkDiscountsComponent } from './components/create-bulk-discounts/create-bulk-discounts.component'; import { CreateQuantityDiscountComponent } from './components/create-quantity-discount/create-quantity-discount.component'; import { OrdersAllComponent } from './components/orders/orders-all/orders-all.component'; import { AwaitingPaymentComponent } from './components/orders/awaiting-payment/awaiting-payment.component'; import { AwaitingFulfilmentComponent } from './components/orders/awaiting-fulfilment/awaiting-fulfilment.component'; import { AwaitingShipmentComponent } from './components/orders/awaiting-shipment/awaiting-shipment.component'; import { HighRiskComponent } from './components/orders/high-risk/high-risk.component'; import { PreOrdersComponent } from './components/orders/pre-orders/pre-orders.component'; import { IncompleteComponent } from './components/orders/incomplete/incomplete.component'; import { ArchivedComponent } from './components/orders/archived/archived.component'; import { RefundedComponent } from './components/orders/refunded/refunded.component'; import { ShippedComponent } from './components/orders/shipped/shipped.component'; import { CheckoutComponent } from './components/checkout/checkout.component'; import { ShippingIntegrationComponent } from './components/shipping-integration/shipping-integration.component'; import { ShippingSlipComponent } from './components/shipping-slip/shipping-slip.component'; import { TaxOverridesComponent } from './components/tax-overrides/tax-overrides.component'; import { AddProductsComponent } from './components/view-products/add-products/add-products.component'; export const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: DashboardComponent }, { path: 'products', component: ViewProductsComponent, children: [ { path: '', redirectTo: 'all', pathMatch: 'full'}, { path: 'all', component: ViewAllProductsComponent}, { path: 'featured', component: ViewFeaturedComponent}, { path: 'stock', component: ViewOutStockComponent}, { path: 'visible', component: ViewVisibleComponent}, { path: 'notVisible', component: ViewNotVisibleComponent}, { path: 'addProducts', component: AddProductsComponent} ] }, { path: 'bulkEdit', component: BulkEditComponent }, { path: 'import/product', component: ImportProductsComponent }, { path: 'export/product', component: ExportProductsComponent }, { path: 'view/couponCode', component: ViewCouponCodeComponent }, { path: 'create/couponCode', component: CreateCouponCodeComponent }, { path: 'view/bulkDiscount', component: ViewBulkDiscountsComponent }, { path: 'create/bulkDiscount', component: CreateBulkDiscountsComponent }, { path: 'view/quantityDiscounts', component: ViewQuantityDiscountComponent }, { path: 'create/quantityDiscount', component: CreateQuantityDiscountComponent }, { path: 'orders', component: OrdersComponent, children: [ { path: 'all', component: OrdersAllComponent}, { path: 'payment', component: AwaitingPaymentComponent}, { path: 'fulfilment', component: AwaitingFulfilmentComponent}, { path: 'shipmend', component: AwaitingShipmentComponent}, { path: 'high-risk', component: HighRiskComponent}, { path: 'pre-orders', component: PreOrdersComponent}, { path: 'in-complete', component: IncompleteComponent}, { path: 'archive', component: ArchivedComponent}, { path: 'refund', component: RefundedComponent}, { path: 'shipped', component: ShippedComponent}, ] }, { path: 'general', component: GeneralComponent }, { path: 'checkout', component: CheckoutComponent }, { path: 'shipping', component: ShippingComponent }, { path: 'create/shipping/:id', component: CreateShippingProfileComponent }, { path: 'shipping/slip', component: ShippingSlipComponent }, { path: 'shipping/integration', component: ShippingIntegrationComponent }, { path: 'taxes', component: TaxedComponent }, { path: 'tax/country/:id', component: TaxCountryComponent }, { path: 'tax/overrides/:id', component: TaxOverridesComponent } ] @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class AppRoutingModule { }