I have been sifting through various articles over the last couple of hours and I cannot figure out why Angular 8 with Ivy is throwing me a curveball.
Consider the following directory:
Media-library will be a component I would like to render on the Dashboard.
In Angular 7 without the Ivy engine, this would have been a simple task to complete, however, I cannot get this to work with Ivy.
In media-library.module.ts I have (code removed for brevity):
declarations: [MediaLibraryComponent],
entryComponents: [MediaLibraryComponent],
exports: [MediaLibraryComponent] /* add this because i tried everything */
Then in the app.module.ts, I imported this module (code removed for brevity):
imports: [MediaLibraryModule]
Adding to app.component.html renders this just fine, as I added the import of the module to app.module.ts, working on the assumption that Angular 8 Ivy still sees global imports, I thought that if I moved the HTML block to dashboard.component.html, it would still work? Not a chance.
I then removed it from app.module.ts and added it to dashboard.module.ts hoping that importing the module where I actually need it would work? Not a chance.
I even added the MediaLibraryComponent as a declaration directly to dashboard.module.ts hoping it would pick it up. Still nothing.
I'm dead certain this is something to with Ivy, I just don't know what? I've read through the documentation looking for any breaking changes that might affect entryComponents, however, everything I have now, is still valid.
Has anyone else run into this and now how to fix it?