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
Hi,
Thank you for your great work here!
I have tried to get the plugin architecture to work.
I created the plugin and can build it successfully. The plugin Loader itself just works fine while loading the javascript source file. The result of the pluginLoader load function (the moduleFactory object) looks like this
The load Plugin Function itself gives me the error massage TypeError: moduleFactory.create is not a function. (In 'moduleFactory.create(this.injector)', 'moduleFactory.create' is undefined) in the resolve part of the load function! Can you point me with that information what I am doin wrong?
Thanks For Help
The text was updated successfully, but these errors were encountered:
Later when you want to instantiate a component you should use the component class directly. Question is how to obtain the component classes from instantiated module. You can perhaps use the bootstrap components and/or entryComponents of the module, but I did not find a non-hacky way to access those properties. Instead I solved it with custom DI tokens.
// get hold of some component via DI -> 'entry' is a custom string token in the loaded moduleconstentryComponentClass=moduleRef.injector.get('entry');this.viewContainerRef.createComponent(entryComponentClass,{injector: moduleRef.injector,ngModuleRef: moduleRef});
Hi,
Thank you for your great work here!
I have tried to get the plugin architecture to work.
I created the plugin and can build it successfully. The plugin Loader itself just works fine while loading the javascript source file. The result of the pluginLoader load function (the moduleFactory object) looks like this
The load Plugin Function itself gives me the error massage
TypeError: moduleFactory.create is not a function. (In 'moduleFactory.create(this.injector)', 'moduleFactory.create' is undefined)
in the resolve part of the load function! Can you point me with that information what I am doin wrong?Thanks For Help
The text was updated successfully, but these errors were encountered: