-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors adding to declarations array with later versions of Angular #21
Comments
I'm getting this
I tried that method but it started showing more nonsense. |
It's not a module, it's a component, and should be in the declarations array of the module you want to use it in OR in a shared module (which also exports it) if you want to use it in multiple places - not in the imports array. |
I missed this one. thanks a lot |
i am trying to implement as what you said. but i do not show anything on DOM. can you please help me out. |
Hi,
I've followed as per the README and am encountering the same issues as the person below. I've reviewed all closed issues in case this is a known issue already resolved but couldn't find anything specifically relating to Angular versions 9+ (I'm using 10).
Cannot declare 'CalendarHeatmap' in an NgModule as it's not a part of the current compilation angular2 calendar heatmap
https://stackoverflow.com/questions/60834457/importing-angular2-calendar-heatmap-causes-jit-compilation-error
Error is:
Cannot declare 'CalendarHeatmap' in an NgModule as it's not a part of the current compilation.
So following other suggestions, I attempted something like https://stackoverflow.com/questions/60248428/angular-app-cannot-compile-after-update-from-v8-to-v9 (see below) and used MyCalendarHeatmap in the declarations. This just prints out the div (unsurprisingly).
I see recent questions (so am assuming people using relatively recent Angular versions) so thinking someone must have a workaround?
thanks
UPDATE: FIXED
Just needed to use the right hook.
For anyone else needing the info, I've added the full error message above.
I plonked the below directly above my @NgModule declaration, but you may wish to extract it out to a shared module and then import that module for neatness.
Haven't used this fully yet, but it looks great - thanks!
The text was updated successfully, but these errors were encountered: