The examples are using the RC 6 of version 9 with Ivy turned on. This is necessary because what we achieve in this example hasn’t been possible in pre Ivy versions.
Yes you are right, the code to dynamically create a component can also be used with the ViewEngine
. The only thing that differs is that you would need to specify your component as EntryComponents
.
Now, the difference comes in lazy loading. Once you use ViewEngine
and EntryComponents
the QuizCardComponent
is not lazy-loaded, it’s only dynamically rendered. So, it’ doesn’t get split into its own chunk.
If you use Ivy, on the other hand, the QuizCardComponent
and the Material dependencies it uses, get separated into a separate chunk.