From d236fd10c3f533b83cbce2b0ef3de05a0257eaad Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 18 Sep 2015 15:02:32 -0700 Subject: [PATCH] [Framework] Move registration-tracking Move registration-tracking for Angular built-ins such that these are correctly tracked at the instance level. --- platform/framework/src/register/CustomRegistrars.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/framework/src/register/CustomRegistrars.js b/platform/framework/src/register/CustomRegistrars.js index 6b840a4310..0051105036 100644 --- a/platform/framework/src/register/CustomRegistrars.js +++ b/platform/framework/src/register/CustomRegistrars.js @@ -39,6 +39,7 @@ define( function CustomRegistrars(app, $log) { this.app = app; this.$log = $log; + this.registered = {}; // Track registered keys by extension } // Utility; bind a function to a "this" pointer @@ -52,12 +53,14 @@ define( // named methods on Angular modules, which follow the normal // app.method(key, [ deps..., function ]) pattern. function customRegistrar(angularFunction) { - var registered = {}; return function (extension, index) { var app = this.app, $log = this.$log, key = extension.key, - dependencies = extension.depends || []; + dependencies = extension.depends || [], + registered = this.registered[angularFunction] || {}; + + this.registered[angularFunction] = registered; if (!key) { $log.warn([