this is my app module file all bits and pieces are at the same place as mentioned in document
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import * as PlotlyJS from 'plotly.js-dist';
import { PlotlyModule } from 'angular-plotly.js';
PlotlyModule.plotlyjs = PlotlyJS;
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
PlotlyModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
below is the error i am getting in cosole
main.ts:12 Error: Invalid PlotlyJS object. Please check https://github.com/plotly/angular-plotly.js#quick-start to see how to add PlotlyJS to your project.
at new PlotlyModule (angular-plotly.js.js:520)
at Object.PlotlyModule_Factory [as factory] (angular-plotly.js.js:529)
at R3Injector.hydrate (core.js:11416)
at R3Injector.get (core.js:11236)
at core.js:11273
at Set.forEach (<anonymous>)
at R3Injector._resolveInjectorDefTypes (core.js:11273)
at new NgModuleRef$1 (core.js:25336)
at NgModuleFactory$1.create (core.js:25390)
at core.js:29276