I am looking at loading Modules dynamically in my child routing. I am trying out this package but I am getting some errors that the module can't be found on Angular 10.
I tried to create a Stackblitz version so I can show you what I am trying to do but when I install this package on Stackblitz, I get the error ngcc failed to run on @wishtack/reactive-component-loader@1.1.2..
Anyway, what I am trying in my main app-routing.module file is the following:
The TemplateResolver will receive a recipe with instructions on what template needs to be loaded, which should be decided in the TemplateLoaderComponent.
In the TemplateLoaderComponent I would like to be able to load Module A, Module B or Module C based on what the recipe returns.
Then these Modules will have their own routing file with a root path ('') and a 'thankyou' path.
Is that possible with this package?
Alternatively I would do it in Angular using a load childeren construction like:
but I don't want to have to be come rootpath/moduleA. It should just be rootpath and then based on the Template Resolver it loads either ModuleA, B, or C.
Hi,
I am looking at loading Modules dynamically in my child routing. I am trying out this package but I am getting some errors that the module can't be found on Angular 10. I tried to create a Stackblitz version so I can show you what I am trying to do but when I install this package on Stackblitz, I get the error
ngcc failed to run on @wishtack/reactive-component-loader@1.1.2.
.Anyway, what I am trying in my main
app-routing.module
file is the following:The
TemplateResolver
will receive a recipe with instructions on what template needs to be loaded, which should be decided in the TemplateLoaderComponent.In the
TemplateLoaderComponent
I would like to be able to load Module A, Module B or Module C based on what the recipe returns.Then these Modules will have their own routing file with a root path ('') and a 'thankyou' path.
Is that possible with this package?
Alternatively I would do it in Angular using a load childeren construction like:
but I don't want to have to be come
rootpath/moduleA
. It should just berootpath
and then based on the Template Resolver it loads either ModuleA, B, or C.