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

Method constructor

src/material/menu/menu-item.ts:87–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 _triggersSubmenu: boolean = false;
86
87 constructor() {
88 inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
89 this._parentMenu?.addItem?.(this);
90 this._isAnchor = this._elementRef.nativeElement.tagName === 'A';
91 }
92
93 /** Focuses the menu item. */
94 focus(origin?: FocusOrigin, options?: FocusOptions): void {

Callers

nothing calls this directly

Calls 2

loadMethod · 0.80
addItemMethod · 0.45

Tested by

no test coverage detected