Closed jpike88 closed 5 years ago
Relevant PR? https://github.com/HaithemMosbahi/ngx-avatar/pull/48
Hi, I am not sure I understand the issue here ! This component was not implemented for ng1, it's for Angular 2+. The pull request that you mentioned is meant for supporting Angular Elements and not NgUpgrade
angular-avatar is a completely different library
angular-avatar is a completely different library
I'm aware of that, just giving you background
This component was not implemented for ng1, it's for Angular 2+.
But you didn't implement a component, you implemented a module that exports a single component. This makes accessing the component directly for entryComponents to be impossible, unless I either:
avatar.module.ts
( we did this )https://angular.io/api/upgrade/static/downgradeComponent
Zero ng1 knowledge is needed
I forked your demo, to show you... app.module.ts
is all you need to look at:
https://stackblitz.com/edit/ngx-avatar-demo-obfbwn
I have a whole bunch of other 3rd party ng2 components doing this and they work fine, this is the only one that presents issues.
Now I understand the problem, the AngularComponent class is needed in order to be able to downgrade it and use it ing ng1. I will export AvatarComponent class in the next version
fixed in version 3.5.0
Great, that does the trick. Thanks. Sorry false alarm
It's not immediately clear how to use this with ngUpgrade, as usually 3rd party components provide the component itself, not a module.
That way, I can use that component in entryComponents, and declare this code in my AppModule:
I tried this PR (https://github.com/HaithemMosbahi/ngx-avatar/pull/48) but the problem is that if I export the component separately, it seems to be an issue:
Component is part of the declaration of 2 modules
How can I easily solve this?