MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / readProp

Function readProp

core/src/components/router/utils/parser.ts:4–12  ·  view source on GitHub ↗
(el: HTMLElement, prop: string)

Source from the content-addressed store, hash-verified

2import { parsePath } from './path';
3
4const readProp = (el: HTMLElement, prop: string): string | null | undefined => {
5 if (prop in el) {
6 return (el as any)[prop];
7 }
8 if (el.hasAttribute(prop)) {
9 return el.getAttribute(prop);
10 }
11 return null;
12};
13
14/**
15 * Extracts the redirects (that is <ion-route-redirect> elements inside the root).

Callers 2

readRedirectsFunction · 0.85
readRouteNodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected