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

Function getFactoryOf

packages/core/src/render3/di.ts:948–956  ·  view source on GitHub ↗
(type: Type<any>)

Source from the content-addressed store, hash-verified

946}
947
948function getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null) | null {
949 if (isForwardRef(type)) {
950 return () => {
951 const factory = getFactoryOf<T>(resolveForwardRef(type));
952 return factory && factory();
953 };
954 }
955 return getFactoryDef<T>(type);
956}
957
958/**
959 * Returns a value from the closest embedded or node injector.

Callers 1

ɵɵgetInheritedFactoryFunction · 0.85

Calls 4

isForwardRefFunction · 0.90
resolveForwardRefFunction · 0.90
getFactoryDefFunction · 0.90
factoryFunction · 0.50

Tested by

no test coverage detected