I have a standalone components angular application running on v17.0.9 and using lazy loading to load all the components via loadChildren and loadComponent for the main layout component and other router outlet components respectively.
Now, I have a parent component in one of that router outlet components which is lazy loaded using loadComponent with the name of order and associated with a route, and 4 child components which are not associated with any route and imported in that parent components’ ‘import’ parameter.
I have a custom error handling class implementing the angular’s ErrorHandler class and have set the namedChunks property as true in the angular.json file’s build properties of my app.
Now the error stack returns with the name of the chunks if I encounter any error in the parent component, but if I have any specific error in one of the child component, the stack does not return the chunk name of the child component.
Now, I know the namedChunks works only with the lazy loaded routes, is there a way in my application, I can get the name of the chunks of my child components as well without associating them with any route.
Any help will be greatly appreciated.
Thanks
I have tried the namedChunks property in the angular.json but it only works with the components that are associated with any route, not the child components which are not associated with any routes.
HarshG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.