Posts

Showing posts with the label lazy loading standalone components

Lazy Loading in Angular 17 - Standalone - Routing

                Here, we are going to see how to implement Lazy Loading in Angular 17 with standalone components. For that we need to do some configuration in our Component.ts file in which component we using routerLink attribute. Step - 1 : Create the routes we need to call and also our lazy loading component Syntax for Lazy load :           export const routes: Route = [                { path: 'path-name', loadComponent: () => import(' path-of-the-lazy-loading-component ').then(d                               => d.lazy-load-component-name) },          ] import { Route } from '@angular/router' ; import { FirstcomponentComponent } from './firstcomponent/firstcomponent.component' ; export const routes : Route [] = [   { path : 'first' ...