-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Angular 6 issues? Please add a @NgModule annotation. #198
Comments
Thanks for the report. For the previous project, do you mean one that was running on Angular 5? |
Also, can you try |
Yeah, on an older project based on Angular 5. And i already use the v2.0.0-beta.1, let me know if you want me to do anything else :) Or if you have any fix / workaround. |
I can try testing on Angular 6 and seeing what happens. But I can't get to it until this weekend. If you are interested in debugging and opening a PR, I can review. |
With Angular 6 and CLI, that worked for me: |
Nice! That works for me as well. I saw something about a --build-optimizer somewhere. But i kind of thought that the hole point of doing a production build was to optimize stuff :) But nice to have a workaround. How much do you loose bu turning these two options off? I mean performance a compression wise and so on? |
I had to declare ChartistComponent in my AppModule, then aot succeeded |
So is this a documentation problem? |
Let me know if this is a documentation problem or a code problem and I can reopen |
hey willsoto, there is actually no chance to create a aot production build... |
@SebastianRuecker I'm facing with the same issue, did you find any workaround > |
Did anyone find a solution for this? --aot is important |
@SebastianRuecker I am facing a same issue while running on Local, can you help me out. |
@willsoto - Fairly sure this is a code issue. Also having the same issue when trying to use chartist in an Ionic 4 (Angular 6) app. Cannot build due to this. |
@seabass223 - Any chance you can give us a peak at how you did this? If I declare the Component in my AppModule, I can't seem to use it anywhere else. |
I did what @seabass223 suggested:
I hope that helped |
I still have it working with latest version of angular since I just updated angular this week. I’ll see if I can sandbox in a demo project. Back in a few days. |
@mmahgoub Thanks mate, that worked for me. I actually just copied the src for both the component and the module into my own project. |
Here are my angular/chartist versions in package.json as of now:
app.module.ts
where chartist.component.ts looks like this Usagehtml
When I build AOT I use the command I hope this helps. |
Unexpected value 'ChartistModule in 'node_modules/ng-chartist/bundles/ng-chartist.umd.js' imported by the module 'DashboardModule in 'dashboard.module.ts'. Please add a @NgModule annotation.
I get this error now when i try to use Chartist in a Angular 6 project. I have tried with the various suggestions in this #94 but i'm not sure how related they are.
I have also had a look at #124 but tbh i don't understand any of it :)
It works when i run locally but the build command fails. It works fine in a previous project that is not running Angular 6.
The text was updated successfully, but these errors were encountered: