Skip to content

Commit 7230d88

Browse files
committed
Creating the PlotlySharedModule
1 parent 782b474 commit 7230d88

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { PlotlyService } from './plotly.service';
5+
import { PlotlyComponent } from './plotly.component';
6+
7+
8+
@NgModule({
9+
declarations: [PlotlyComponent],
10+
imports: [CommonModule],
11+
providers: [PlotlyService],
12+
exports: [PlotlyComponent],
13+
})
14+
export class PlotlySharedModule {
15+
constructor() { }
16+
}

projects/plotly/src/lib/plotly-via-cdn.module.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

44
import { PlotlyService } from './plotly.service';
5-
import { PlotlyModule } from './plotly.module';
5+
import { PlotlySharedModule } from './plotly-shared.module';
66

77

88
export type PlotlyBundleName = 'basic' | 'cartesian' | 'geo' | 'gl3d' | 'gl2d' | 'mapbox' | 'finance';
99

1010

1111
@NgModule({
1212
declarations: [],
13-
imports: [CommonModule, PlotlyModule],
13+
imports: [CommonModule, PlotlySharedModule],
1414
providers: [PlotlyService],
15-
exports: [PlotlyModule],
15+
exports: [PlotlySharedModule],
1616
})
1717
export class PlotlyViaCDNModule {
1818
private static plotlyBundle?: string = null;

projects/plotly/src/lib/plotly-via-window.module.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

44
import { PlotlyService } from './plotly.service';
5-
import { PlotlyModule } from './plotly.module';
5+
import { PlotlySharedModule } from './plotly-shared.module';
66

77

88
@NgModule({
99
declarations: [],
10-
imports: [CommonModule, PlotlyModule],
10+
imports: [CommonModule, PlotlySharedModule],
1111
providers: [PlotlyService],
12-
exports: [PlotlyModule],
12+
exports: [PlotlySharedModule],
1313
})
1414
export class PlotlyViaWindowModule {
1515
constructor() {

projects/plotly/src/lib/plotly.module.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

4-
import { PlotlyComponent } from './plotly.component';
54
import { PlotlyService } from './plotly.service';
5+
import { PlotlySharedModule } from './plotly-shared.module'
66

77

88

99
@NgModule({
10-
declarations: [PlotlyComponent],
11-
imports: [CommonModule],
10+
declarations: [],
11+
imports: [CommonModule, PlotlySharedModule],
1212
providers: [PlotlyService],
13-
exports: [PlotlyComponent],
13+
exports: [PlotlySharedModule],
1414
})
1515
export class PlotlyModule {
1616
public static plotlyjs: any = {};
17-
private plotlyModuleName = 'PlotlyModule';
1817

1918
constructor() {
2019
if (!this.isValid()) {

0 commit comments

Comments
 (0)