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

Method onClick

src/aria/private/menu/menu.ts:554–563  ·  view source on GitHub ↗

Handles click events for the menu bar.

(event: MouseEvent)

Source from the content-addressed store, hash-verified

552
553 /** Handles click events for the menu bar. */
554 onClick(event: MouseEvent) {
555 const item = this.inputs.items().find(i => i.element()?.contains(event.target as Node));
556
557 if (!item) {
558 return;
559 }
560
561 this.goto(item);
562 item.expanded() ? item.close() : item.open();
563 }
564
565 /** Handles mouseover events for the menu bar. */
566 onMouseOver(event: MouseEvent) {

Callers

nothing calls this directly

Calls 5

gotoMethod · 0.95
expandedMethod · 0.80
openMethod · 0.65
elementMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected