aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/controller.js')
-rw-r--r--src/ng/controller.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ng/controller.js b/src/ng/controller.js
index fa90f8cd..67f70aad 100644
--- a/src/ng/controller.js
+++ b/src/ng/controller.js
@@ -23,7 +23,11 @@ function $ControllerProvider() {
* annotations in the array notation).
*/
this.register = function(name, constructor) {
- controllers[name] = constructor;
+ if (isObject(name)) {
+ extend(controllers, name)
+ } else {
+ controllers[name] = constructor;
+ }
};