Skip to content

Instantly share code, notes, and snippets.

@MindInitiatives
Created February 4, 2025 09:18
Show Gist options
  • Save MindInitiatives/4a8b14713bdf8f35b7751d3237f007c9 to your computer and use it in GitHub Desktop.
Save MindInitiatives/4a8b14713bdf8f35b7751d3237f007c9 to your computer and use it in GitHub Desktop.
The main routes that contains route to the product component
import { Routes } from "@angular/router";
import { MainComponent } from "./main.component";
import { ProductEffects } from "../store/product";
import { provideEffects } from "@ngrx/effects";
export const mainRoutes: Routes = [
{
path: '',
component: MainComponent,
children: [
{
path: 'products',
providers: [
provideEffects(ProductEffects)
],
data: { title: 'Products' },
loadChildren: () =>
import('./products/products.routes').then((m) => m.productRoutes),
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment