angular-plotly.js
angular-plotly.js copied to clipboard
Angular 11 - plotly-plot' is not a known element
I followed the getting started steps provided in the documentation but I am not able to run Plotly successfully
npm version: 6.14.6 node version: 12.18.1 Angular cli version: 11.2.14
I get the following error when I add <plotly-plot> element to my template
plotly-plot' is not a known element:
I have tried the following
- Used the CDN version
- https://github.com/plotly/angular-plotly.js/issues/155
Did I miss something?
Hello @kperveen , funny is that this is an angular error. Could you confirm that you've added/imported the PlotlyViaCdnModule correctly to the app.module ?
Same problem with angular 13.3.2.
Importing PlotlyModule in AppModule but when compiling it fails on the
I get this error:
Error: src/app/features/esums/esums.module.ts:37:5 - error NG6002: 'PlotlyModule' does not appear to be an NgModule class.
37 PlotlyModule,
~~~~~~~~~~~~
.yarn/__virtual__/angular-plotly.js-virtual-15eb60545d/0/cache/angular-plotly.js-npm-4.0.4-a6b83620e2-759af9442d.zip/node_modules/angular-plotly.js/lib/plotly.module.d.ts:1:22
1 export declare class PlotlyModule {
~~~~~~~~~~~~
This likely means that the library (angular-plotly.js) which declares PlotlyModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
I setup the project with yarn using pnp. Now it throws this error.