We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12f16c5 commit b855411Copy full SHA for b855411
src/app/plotly/plotly.module.ts
@@ -1,13 +1,19 @@
1
-import { NgModule } from '@angular/core';
2
-import { CommonModule } from '@angular/common';
+import { NgModule, ModuleWithProviders } from "@angular/core";
+import { CommonModule } from "@angular/common";
3
4
-import { PlotComponent } from './plot/plot.component';
+import { PlotComponent } from "./plot/plot.component";
5
+import { PlotlyService } from "./plotly.service";
6
7
@NgModule({
8
imports: [CommonModule],
9
declarations: [PlotComponent],
- exports: [PlotComponent],
10
+ exports: [PlotComponent]
11
})
12
export class PlotlyModule {
-
13
+ static forRoot(): ModuleWithProviders {
14
+ return {
15
+ ngModule: PlotlyModule,
16
+ providers: [PlotlyService]
17
+ };
18
+ }
19
}
0 commit comments