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
Following the discussions held yesterday during the tooling meeting we should create a documentation explaining how to load a dynamic component.
This document should also make it clear which scenarios are supported and not. In many cases currently, users are currently using a mixture of AOT and JIT to dynamically load a component. This doesn't work with any build optimizations (ie: terser and build optimizer), among other things due to the ngJitMode: false guards.
Using AOT/JIT interop with build optimizations is currently not supported as the main use cases for this appears to be unit testing scenarios, that is until the Dynamic view composition project which is currently listed on ng-elephant is finalized.
Users who are concerned about performance, security and bundle sizes shouldn't use AOT+JIT interop. Compile components at runtime is a cross-site scripting (XSS) vulnerability in itself and shouldn't be used for production.
Reacted by Djidel Oussama, Samuel Fernández, Sheik Althaf, Totati, Oleksandr Voloshyn, UdayAppam, Front-end developer, Oleksandr Domanskyi, Gianluca Maggio, Mahmoud Ibrahim and 4 more
@alan-agius4, Dynamic view composition is a base feature for our application framework (built on top of angular) and we are in trouble for the reasons you explained here. Can you give me a look on what you called "Dynamic view composition project"?
Reacted by Vincent lemaitre, Luciano Martorella, Alemar and wmaykit
@alan-agius4 Could you please give us an estimation for when this will be done ? And Is there any workaround at the moment for Angular 9/10 for AOT + JIT or is there a proper way to implement such a thing ? Or as is there an estimation for the 'Dynamic view composition project' ? I am facing mostly the same problems as @gmaggiodev said.
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Reacted by Alemar, Djidel Oussama, wmaykit, Vladimir Pavlenko, Manuel Bravo Veiguela and Sachith Rukshan
Activity
gmaggiodev commentedon Nov 10, 2020
@alan-agius4, Dynamic view composition is a base feature for our application framework (built on top of angular) and we are in trouble for the reasons you explained here. Can you give me a look on what you called "Dynamic view composition project"?
alan-agius4 commentedon Nov 10, 2020
@gmaggiodev, dynamic view composition is still at design phase.
[-][docs] Dynamic Component Loading[/-][+]Create dynamic component loading documentation[/+]pcatuna commentedon Dec 3, 2020
@alan-agius4 Could you please give us an estimation for when this will be done ? And Is there any workaround at the moment for Angular 9/10 for AOT + JIT or is there a proper way to implement such a thing ? Or as is there an estimation for the 'Dynamic view composition project' ? I am facing mostly the same problems as @gmaggiodev said.
hydra1983 commentedon Mar 26, 2021
@pcatuna you may have a look at this Uncaught (in promise): Error: Angular JIT compilation failed: '@angular/compiler' not loaded! in angular 9
I think exclude of TerserPlugin may help to decrease the generated size after
side_effectsset tofalse.angular-robot commentedon Jun 4, 2021
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
bh3605 commentedon Jun 16, 2021
I'm more curious about your reference to ng-elephant. What is that?
angular-robot commentedon Jun 24, 2021
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
4 remaining items
NoelDeMartin commentedon Mar 4, 2024
In the end we came up with our own workaround to do this #44660 (comment), in case anyone is interested.