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

Function ngOnInit

src/material/dialog/dialog-content-directives.ts:100–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 protected abstract _onRemove(): void;
99
100 ngOnInit() {
101 if (!this._dialogRef) {
102 this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;
103 }
104
105 if (this._dialogRef) {
106 Promise.resolve().then(() => {
107 this._onAdd();
108 });
109 }
110 }
111
112 ngOnDestroy() {
113 // Note: we null check because there are some internal

Callers

nothing calls this directly

Calls 3

getClosestDialogFunction · 0.85
resolveMethod · 0.80
_onAddMethod · 0.45

Tested by

no test coverage detected