mirror of https://github.com/OpenVidu/openvidu.git
ov-components: Configures root injection for overlay
Configures root injection for the CDK overlay container. This ensures the overlay container is properly initialized and available throughout the application. It also makes the overlay available application wide and solves the problem of injecting multiple instances.pull/856/head
parent
1a3edb9a61
commit
bb47c3696c
|
|
@ -1,7 +1,9 @@
|
|||
import { OverlayContainer } from '@angular/cdk/overlay';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CdkOverlayContainer extends OverlayContainer {
|
||||
private readonly cdkContainerClass: string = '.cdk-overlay-container';
|
||||
private defaultSelector = 'body';
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export class OpenViduComponentsModule {
|
|||
BroadcastingService,
|
||||
// CaptionService,
|
||||
CdkOverlayContainer,
|
||||
{ provide: OverlayContainer, useClass: CdkOverlayContainer },
|
||||
{ provide: OverlayContainer, useExisting: CdkOverlayContainer },
|
||||
ChatService,
|
||||
DeviceService,
|
||||
DocumentService,
|
||||
|
|
|
|||
Loading…
Reference in New Issue