Skip to content

Angular Plotly not working with angular universal #229

@tarunmishra592

Description

@tarunmishra592

Hi,

I am using angular plotly and facing issue while adding plotly with window.

Error: Plotly object not found on window.

Screenshot 2023-03-21 at 3 04 30 PM

i already added this in angular.json
"scripts": ["./node_modules/plotly.js/dist/plotly.min.js"]

app.module.ts

import { CommonModule } from '@angular/common';
import { PlotlyViaWindowModule } from 'angular-plotly.js';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    CommonModule,
    BrowserModule.withServerTransition({ appId: 'serverApp' }),
    AppRoutingModule,
    PlotlyViaWindowModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions