MCPcopy
hub / github.com/angular/angular / forwardRef

Function forwardRef

packages/core/src/di/forward_ref.ts:69–78  ·  view source on GitHub ↗
(forwardRefFn: ForwardRefFn)

Source from the content-addressed store, hash-verified

67 * @publicApi
68 */
69export function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {
70 (<any>forwardRefFn).__forward_ref__ = forwardRef;
71 if (ngDevMode) {
72 (<any>forwardRefFn).toString = function () {
73 return stringify(this());
74 };
75 }
76
77 return <Type<any>>(<any>forwardRefFn);
78}
79
80/**
81 * Lazily retrieves the reference value from a forwardRef.

Callers 15

ModuleClass · 0.90
AppClass · 0.90
DoorClass · 0.90
constructorMethod · 0.90
providers_spec.tsFile · 0.90
MainModuleClass · 0.90

Calls 1

stringifyFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…