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

Function makeInjectable

test/angular/1.6/angular.js:8457–8465  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

8455
8456 function factory($injector) {
8457 function makeInjectable(fn) {
8458 if (isFunction(fn) || isArray(fn)) {
8459 return /** @this */ function(tElement, tAttrs) {
8460 return $injector.invoke(fn, this, {$element: tElement, $attrs: tAttrs});
8461 };
8462 } else {
8463 return fn;
8464 }
8465 }
8466
8467 var template = (!options.template && !options.templateUrl ? '' : options.template);
8468 var ddo = {

Callers 1

factoryFunction · 0.70

Calls 2

isArrayFunction · 0.85
isFunctionFunction · 0.70

Tested by

no test coverage detected