MCPcopy Index your code
hub / github.com/angular/components / _registerCloseHandler

Method _registerCloseHandler

src/cdk/menu/menu-trigger.ts:311–319  ·  view source on GitHub ↗

* Subscribe to the MenuStack close events if this is a standalone trigger and close out the menu * this triggers when requested.

()

Source from the content-addressed store, hash-verified

309 * this triggers when requested.
310 */
311 private _registerCloseHandler() {
312 if (!this._parentMenu) {
313 this.menuStack.closed.pipe(takeUntil(this.destroyed)).subscribe(({item}) => {
314 if (item === this.childMenu) {
315 this.close();
316 }
317 });
318 }
319 }
320
321 /**
322 * Subscribe to the overlays outside pointer events stream and handle closing out the stack if a

Callers 1

constructorMethod · 0.95

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected