Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 12f16c5 + b855411 commit 43e506fCopy full SHA for 43e506f
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