MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/cdk/overlay/overlay-directives.ts:292–305  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

290 // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.
291
292 constructor() {
293 const templateRef = inject<TemplateRef<any>>(TemplateRef);
294 const viewContainerRef = inject(ViewContainerRef);
295 const defaultConfig = inject(CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG, {optional: true});
296 const globalConfig = inject(OVERLAY_DEFAULT_CONFIG, {optional: true});
297
298 this.usePopover = globalConfig?.usePopover === false ? null : 'global';
299 this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);
300 this.scrollStrategy = this._scrollStrategyFactory();
301
302 if (defaultConfig) {
303 this._assignConfig(defaultConfig);
304 }
305 }
306
307 /** The associated overlay reference. */
308 get overlayRef(): OverlayRef {

Callers

nothing calls this directly

Calls 1

_assignConfigMethod · 0.95

Tested by

no test coverage detected