Skip to content

Commit

Permalink
refactor: removed unnecessary forRoot module declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
dereekb committed Mar 25, 2022
1 parent f694f86 commit a8f850e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { BehaviorSubject } from 'rxjs';
/**
* Used for coordinating popovers and closing/replacing existing ones when a new popover of the same name appears.
*/
@Injectable()
@Injectable({
providedIn: 'root'
})
export class DbxPopoverCoordinatorService {

private _popovers = new BehaviorSubject<Map<DbxPopoverKey, DbxPopoverController>>(new Map());
Expand Down
14 changes: 1 addition & 13 deletions packages/dbx-web/src/lib/interaction/popover/popover.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { DbxPopoverService } from './popover.service';
import { DbxPopoverContentComponent } from './popover.content.component';
import { DbxPopoverComponent } from './popover.component';
import { DbxPopoverControlsDirective } from './popover.controls.directive';
import { DbxPopoverCoordinatorService } from './popover.coordinator.service';
import { DbxPopoverHeaderComponent } from './popover.header.component';
import { DbxPopoverScrollContentComponent } from './popover.scroll.content.component';
import { DbxActionPopoverDirective } from './popover.action.directive';
Expand Down Expand Up @@ -56,15 +55,4 @@ import { DbxStyleLayoutModule } from '../../layout/style/style.layout.module';
DbxPopoverService
]
})
export class DbxPopoverInteractionModule {

static forRoot(): ModuleWithProviders<DbxPopoverInteractionModule> {
return {
ngModule: DbxPopoverInteractionModule,
providers: [
DbxPopoverCoordinatorService
]
};
}

}
export class DbxPopoverInteractionModule { }
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { BehaviorSubject } from 'rxjs';
/**
* Used for coordinating popups and closing/replacing existing ones when a new popup of the same name appears.
*/
@Injectable()
@Injectable({
providedIn: 'root'
})
export class DbxPopupCoordinatorService {

private _popups = new BehaviorSubject<Map<DbxPopupKey, DbxPopupController>>(new Map());
Expand Down
13 changes: 1 addition & 12 deletions packages/dbx-web/src/lib/interaction/popup/popup.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,4 @@ import { DbxStyleLayoutModule } from '../../layout/style/style.layout.module';
DbxPopupService
]
})
export class DbxPopupInteractionModule {

static forRoot(): ModuleWithProviders<DbxPopupInteractionModule> {
return {
ngModule: DbxPopupInteractionModule,
providers: [
DbxPopupCoordinatorService
]
};
}

}
export class DbxPopupInteractionModule {}

0 comments on commit a8f850e

Please sign in to comment.