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

Method open

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

Open the attached menu.

()

Source from the content-addressed store, hash-verified

113
114 /** Open the attached menu. */
115 open() {
116 if (!this._parentMenu) {
117 this._menuTracker.update(this);
118 }
119 if (!this.isOpen() && this.menuTemplateRef != null) {
120 this.opened.next();
121
122 this.overlayRef =
123 this.overlayRef || createOverlayRef(this._injector, this._getOverlayConfig());
124 this.overlayRef.attach(this.getMenuContentPortal());
125 this._changeDetectorRef.markForCheck();
126 this._subscribeToOutsideClicks();
127 }
128 }
129
130 /** Close the opened menu. */
131 close() {

Callers 3

toggleMethod · 0.95
_toggleOnKeydownMethod · 0.95
toggleMenusMethod · 0.95

Calls 8

_getOverlayConfigMethod · 0.95
createOverlayRefFunction · 0.90
markForCheckMethod · 0.80
updateMethod · 0.65
attachMethod · 0.65
isOpenMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected