MCPcopy Create free account
hub / github.com/angular/components / coerceElement

Function coerceElement

src/cdk/coercion/element.ts:15–17  ·  view source on GitHub ↗
(elementOrRef: ElementRef<T> | T)

Source from the content-addressed store, hash-verified

13 * Useful for APIs that can accept either a ref or the native element itself.
14 */
15export function coerceElement<T>(elementOrRef: ElementRef<T> | T): T {
16 return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;
17}

Callers 15

constructorMethod · 0.90
setupTriggerEventsMethod · 0.90
withHandlesMethod · 0.90
withRootElementMethod · 0.90
withBoundaryElementMethod · 0.90
constructorMethod · 0.90
withElementContainerMethod · 0.90
_draggingStartedMethod · 0.90
_getBoundaryElementMethod · 0.90
monitorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected