本文整理匯總了TypeScript中@angular/cdk/overlay.OverlayContainer.getContainerElement方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript OverlayContainer.getContainerElement方法的具體用法?TypeScript OverlayContainer.getContainerElement怎麽用?TypeScript OverlayContainer.getContainerElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@angular/cdk/overlay.OverlayContainer
的用法示例。
在下文中一共展示了OverlayContainer.getContainerElement方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnInit
ngOnInit(): void {
let theme = 'light-custom-theme';
if (this.storageService.hasTheme()) {
theme = this.storageService.getTheme();
} else {
this.storageService.setTheme(theme);
}
document.body.classList.add(theme, 'mat-app-background');
this.overlay.getContainerElement().classList.add(theme);
}
示例2: beforeEach
beforeEach(inject([ OverlayContainer ], (oc: OverlayContainer) => {
overlayContainer = oc;
overlayContainerElement = oc.getContainerElement();
}));
示例3: beforeEach
beforeEach(inject([ NzNotificationService, OverlayContainer ], (m: NzNotificationService, oc: OverlayContainer) => {
messageService = m;
overlayContainer = oc;
overlayContainerElement = oc.getContainerElement();
}));
示例4:
configurationService.getApplicationConfiguration().subscribe((conf) => {
overlayContainer.getContainerElement().classList.add(conf.application.theme + '-theme')
})