Variable: useQuerySelectorAll
constuseQuerySelectorAll: {<K>(selector):HTMLElementTagNameMap[K][]; <E>(selector):E[]; }
Defined in: src/infrastructure/dom/dom.service.ts:133
Returns all elements matching a CSS selector.
Call Signature
<
K>(selector):HTMLElementTagNameMap[K][]
Type Parameters
K
K extends keyof HTMLElementTagNameMap
Parameters
selector
K
Returns
HTMLElementTagNameMap[K][]
Call Signature
<
E>(selector):E[]
Type Parameters
E
E extends Element = HTMLElement
Parameters
selector
string
Returns
E[]
Type Param
E
The expected Element subtype.
Param
selector
A CSS selector string.
Returns
An array of matching elements.
Example
const items = useQuerySelectorAll<HTMLLIElement>("li.item");
items.forEach(el => console.log(el.textContent));