MCPcopy
hub / github.com/angular/components / getOption

Function getOption

src/aria/combobox/combobox.spec.ts:87–90  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

85 }
86
87 function getOption(text: string): HTMLElement | null {
88 const options = Array.from(document.querySelectorAll('[ngoption]')) as HTMLElement[];
89 return options.find(option => option.textContent?.trim() === text) || null;
90 }
91
92 function getOptions(): HTMLElement[] {
93 return Array.from(document.querySelectorAll('[ngoption]')) as HTMLElement[];

Callers 1

combobox.spec.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…