MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / provider

Function provider

test/fixtures/foo.js:3830–3839  ·  view source on GitHub ↗
(name, provider_)

Source from the content-addressed store, hash-verified

3828 }
3829
3830 function provider(name, provider_) {
3831 assertNotHasOwnProperty(name, 'service');
3832 if (isFunction(provider_) || isArray(provider_)) {
3833 provider_ = providerInjector.instantiate(provider_);
3834 }
3835 if (!provider_.$get) {
3836 throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
3837 }
3838 return providerCache[name + providerSuffix] = provider_;
3839 }
3840
3841 function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
3842

Callers 1

factoryFunction · 0.85

Calls 2

assertNotHasOwnPropertyFunction · 0.85
isFunctionFunction · 0.85

Tested by

no test coverage detected