Skip to content

Conversation

john-gouda
Copy link

No description provided.

const sharedLibsArr = sharedLibs.split(',');
sharedLibsArr.forEach(sharedLibName => {
const factoryRegexp = new RegExp(`${sharedLibName}.ngfactory$`);
config.externals[0][sharedLibName] = sharedLibName; // define external for code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In sharedLibsArr there is ngfactory$, how is that going to work with ivy?

const entry = moduleType.entry;
const componentFactory = this.cfr.resolveComponentFactory(entry);
this.vcRef.createComponent(componentFactory, undefined, this.injector);
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating factory and component ourselves, can we use ngComponentOutlet

this.component = moduleType.entry;

In template:
<ng-container *ngComponentOutlet="component">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants