Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores

r/angular

members
online


What IS that?? Use Circle to Search with Google to discover “ancient” technology and see just how far we’ve come. Try it now on the new Galaxy Z Flip6.
media poster


App reloads at routing - Module Federation App reloads at routing - Module Federation

I'm migrating a fairly complex application to a monorepo, normally this app has to be loaded as a remote.

As i'm new to this kind of configuration is been a struggle, but right know everything is connected, and i'm able to launch the application standalone and inside its host, aside for some Angular Material style errors, everything looks fine, but my big problem is with the router. The remote application reloads every time I change the url, using routerLink and router.navigate/ByURL.

Is this normal with Module Federation? Or is a problem of configuration? I followed the configuration in this example https://nx.dev/recipes/angular/dynamic-module-federation-with-angular (just the first part before converting the application to dynamic mf) so in my mfe1 I have an app.routes that lazy load the remote-entry.routes and I do the same in my host app.

Thank you in advance for any information you can provide,

Have a nice day