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

Function getFactoryOf

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

Source from the content-addressed store, hash-verified

952}
953
954function getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null) | null {
955 if (isForwardRef(type)) {
956 return () => {
957 const factory = getFactoryOf<T>(resolveForwardRef(type));
958 return factory && factory();
959 };
960 }
961 return getFactoryDef<T>(type);
962}
963
964/**
965 * 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