1

I'm using nested lazy loading in my project app.routing.ts

const routes: Routes = [
  { path: '', loadChildren: './user-panel/user-panel.module#UserPanelModule' },
];

export const Routing: ModuleWithProvidButers = RouterModule.forRoot(routes);

and my user-panel.routing.ts

const routes: Routes = [
  {
    path: '',
    component: UserPanelComponent,
    children: [
      { path: '', loadChildren: './pages/home/home.module#HomeModule' },
    ]
  }
];

export const Routing: ModuleWithProviders = RouterModule.forChild(routes);

But when i use child routing i'm getting this error

ERROR RangeError: Maximum call stack size exceeded
2

1 Answer 1

0

I suggest You please follow the same:-

Solved by deleting unnecessary imports.

Cause of this error you have circular module dependency problem.

For example:

'A' module imports (dependent to) 'B' module

'B' module imports (dependent to) 'A' module

I suggest you to build a common module that other modules should import the common module.

If you have unnecessary imports delete unnecessary imports.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.