Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d7cfe1

Browse files
committed
Converting the PlotlyComponent to standalone: true
1 parente5211dc commit3d7cfe1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

‎projects/plotly/src/lib/plotly-shared.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { PlotlyComponent } from './plotly.component';
66

77

88
@NgModule({
9-
declarations:[PlotlyComponent],
10-
imports:[CommonModule],
9+
imports:[CommonModule,PlotlyComponent],
1110
providers:[PlotlyService],
1211
exports:[PlotlyComponent],
1312
})

‎projects/plotly/src/lib/plotly.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('PlotlyComponent', () => {
1919
windowSpy=jasmine.createSpyObj('Window',['addEventListener','removeEventListener']);
2020

2121
TestBed.configureTestingModule({
22-
declarations:[PlotlyComponent],
22+
imports:[PlotlyComponent],
2323
providers:[
2424
PlotlyService,
2525
],

‎projects/plotly/src/lib/plotly.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,20 @@ import {
1818
output,
1919
OutputEmitterRef,
2020
}from'@angular/core';
21+
import{CommonModule}from'@angular/common';
2122

2223
import{PlotlyService}from'./plotly.service';
2324
import{Plotly}from'./plotly.interface';
2425

2526
//@dynamic
2627
@Component({
2728
selector:'plotly-plot',
29+
standalone:true,
30+
imports:[CommonModule],
2831
template:`<div #plot [attr.id]="divId()" [ngClass]="getClassName()" [ngStyle]="style()">
2932
<ng-content></ng-content>
3033
</div>`,
3134
providers:[PlotlyService],
32-
standalone:false
3335
})
3436
exportclassPlotlyComponentimplementsOnInit,OnChanges,OnDestroy,DoCheck{
3537
protecteddefaultClassName='js-plotly-plot';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp