This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
$FilterProvider.register() accept object in addition to name/factory arguments #4036
Labels
Milestone
Right now, both
$ControllerProvider.register
and$CompileProvider.directive
, in addition to the usual pair of name and factory/constructor arguments, accept an object as a single argument, mapping names to factory/constructor functions.This makes it possible to initialize a bunch of controllers and directives at once, e.g. from the exports of an AMD module, by calling
app.directive(require('directives')).controller(require('controllers'))
.This is not possible however with
$FilterProvider.register
which has no special code for parsing objects – which could be as simple asforEach(name, reverseParams(register))
as in$CompileProvider.directive
.I'd like to know if there is a special reason for this and, if not, whether I should create a pull request for the proposed change.
The text was updated successfully, but these errors were encountered: