You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting error: NG04007: The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.
Tried setting forChild with the routing module but that fails with the MFE.
Some help appreciated, thanks!
The text was updated successfully, but these errors were encountered:
Hi @ScriptedAlchemy,
Shell app using Angular v16, MFE using Angular v15..
MFE has routing module with forRoot():
@NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) export class AppRoutingModule { }
This module is part of exposed standalone component
@Component({ standalone: true, imports: [ AppRoutingModule, SharedModule, BrowserModule, BrowserAnimationsModule, CoreModule ], providers: [ IconService, { provide: APP_INITIALIZER, useFactory: appInitializerFactory, deps: [TranslateService, Injector], multi: true } ], selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] })
Getting error: NG04007: The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.
Tried setting forChild with the routing module but that fails with the MFE.
Some help appreciated, thanks!
The text was updated successfully, but these errors were encountered: