MCPcopy Create free account
hub / github.com/angular/angular / forwardRef

Function forwardRef

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

Source from the content-addressed store, hash-verified

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

Callers 15

ModuleClass · 0.90
AppClass · 0.90
DoorClass · 0.90
constructorMethod · 0.90
SimpleComponentClass · 0.90
MyComp0Class · 0.90

Calls 1

stringifyFunction · 0.90

Tested by

no test coverage detected