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

Method constructor

src/aria/menu/menu-bar.ts:111–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 readonly itemSelected = output<V>();
110
111 constructor() {
112 this._pattern = new MenuBarPattern({
113 ...this,
114 items: this._itemPatterns,
115 multi: () => false,
116 focusMode: () => 'roving',
117 orientation: () => 'horizontal',
118 selectionMode: () => 'explicit',
119 itemSelected: (value: V) => this.itemSelected.emit(value),
120 activeItem: signal(undefined),
121 element: computed(() => this._elementRef.nativeElement),
122 });
123
124 afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});
125
126 afterNextRender(() => {
127 this._collection.startObserving(this.element);
128 });
129 }
130
131 ngOnDestroy() {
132 this._collection.stopObserving();

Callers

nothing calls this directly

Calls 4

signalFunction · 0.85
computedFunction · 0.85
startObservingMethod · 0.80
setDefaultStateEffectMethod · 0.45

Tested by

no test coverage detected