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

Method _subscribeToMenuStackClosed

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

Subscribe to the MenuStack closed events.

()

Source from the content-addressed store, hash-verified

355
356 /** Subscribe to the MenuStack closed events. */
357 private _subscribeToMenuStackClosed() {
358 if (!this._parentMenu) {
359 this.menuStack.closed.subscribe(({focusParentTrigger}) => {
360 if (focusParentTrigger && !this.menuStack.length()) {
361 this._elementRef.nativeElement.focus();
362 }
363 });
364 }
365 }
366
367 /** Sets the role attribute for this trigger if needed. */
368 private _setRole() {

Callers 2

constructorMethod · 0.95
ngAfterContentInitFunction · 0.80

Calls 2

focusMethod · 0.65
lengthMethod · 0.45

Tested by

no test coverage detected