MCPcopy
hub / github.com/angular-ui/ui-router / enforceReturnValue

Function enforceReturnValue

test/angular/1.4/angular.js:4420–4428  ·  view source on GitHub ↗
(name, factory)

Source from the content-addressed store, hash-verified

4418 }
4419
4420 function enforceReturnValue(name, factory) {
4421 return function enforcedReturnValue() {
4422 var result = instanceInjector.invoke(factory, this);
4423 if (isUndefined(result)) {
4424 throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);
4425 }
4426 return result;
4427 };
4428 }
4429
4430 function factory(name, factoryFn, enforce) {
4431 return provider(name, {

Callers 1

factoryFunction · 0.70

Calls 1

isUndefinedFunction · 0.70

Tested by

no test coverage detected