I am currently implementing a MFE setup and tried to import all routes from Remote. This is working already but my components in the Remote are depending on an InjectionToken only provided in the Angular ApplicationConfig of the Remote.
Is there a way to load them in the shell? Or how do I have to handle them?
I have a complete standalone setup, so there are no modules.
Thanks in advance
PS: For my understanding I have to put all providers from app.config.ts to my rendered "root" component in the root called "portal" in my case. Am I right?
I have a service which initializes my app config before bootstrapping my application (remote). After that I save this config in a static variable and and provide it in my app.config.ts as an injection token for use in my whole app. This works perfectly without the MFE setup. So ist there a way to do this in my remotes with MFE setup?
you really have to register them in the shell too. This is because Angular itself thinks this is just lazy loading while in fact it's loading a different micro frontend.
I am currently implementing a MFE setup and tried to import all routes from Remote. This is working already but my components in the Remote are depending on an InjectionToken only provided in the Angular ApplicationConfig of the Remote.
Is there a way to load them in the shell? Or how do I have to handle them?
I have a complete standalone setup, so there are no modules.
Thanks in advance
PS: For my understanding I have to put all providers from
app.config.ts
to my rendered "root" component in the root called "portal" in my case. Am I right?=============================================================================== Update - Add app context:
@angular-architects/native-federation => 18.2.2 @angular/* => 18.2.4
I have a service which initializes my app config before bootstrapping my application (remote). After that I save this config in a static variable and and provide it in my
app.config.ts
as an injection token for use in my whole app. This works perfectly without the MFE setup. So ist there a way to do this in my remotes with MFE setup?app-config.service.ts
:bootstrap.ts
:app.config.ts
: