Skip to content

Commit

Permalink
Merge pull request #29 from fischor/master
Browse files Browse the repository at this point in the history
Exports PlotlyService within static forRoot() method.
  • Loading branch information
andrefarzat committed Jan 8, 2019
2 parents 12f16c5 + b855411 commit 43e506f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/app/plotly/plotly.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgModule, ModuleWithProviders } from "@angular/core";
import { CommonModule } from "@angular/common";

import { PlotComponent } from './plot/plot.component';
import { PlotComponent } from "./plot/plot.component";
import { PlotlyService } from "./plotly.service";

@NgModule({
imports: [CommonModule],
declarations: [PlotComponent],
exports: [PlotComponent],
exports: [PlotComponent]
})
export class PlotlyModule {

static forRoot(): ModuleWithProviders {
return {
ngModule: PlotlyModule,
providers: [PlotlyService]
};
}
}

0 comments on commit 43e506f

Please sign in to comment.