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

Function register

test/angular/1.4/angular.js:18627–18637  ·  view source on GitHub ↗

* @ngdoc method * @name $filterProvider#register * @param {string|Object} name Name of the filter function, or an object map of filters where * the keys are the filter names and the values are the filter factories. * * * **Note:** Filter n

(name, factory)

Source from the content-addressed store, hash-verified

18625 * of the registered filter instances.
18626 */
18627 function register(name, factory) {
18628 if (isObject(name)) {
18629 var filters = {};
18630 forEach(name, function(filter, key) {
18631 filters[key] = register(key, filter);
18632 });
18633 return filters;
18634 } else {
18635 return $provide.factory(name + suffix, factory);
18636 }
18637 }
18638 this.register = register;
18639
18640 this.$get = ['$injector', function($injector) {

Callers 2

$FilterProviderFunction · 0.70
viewSpec.tsFile · 0.50

Calls 2

isObjectFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected