mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Framework] Move registration-tracking
Move registration-tracking for Angular built-ins such that these are correctly tracked at the instance level.
This commit is contained in:
parent
befa66a9e2
commit
d236fd10c3
@ -39,6 +39,7 @@ define(
|
|||||||
function CustomRegistrars(app, $log) {
|
function CustomRegistrars(app, $log) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.$log = $log;
|
this.$log = $log;
|
||||||
|
this.registered = {}; // Track registered keys by extension
|
||||||
}
|
}
|
||||||
|
|
||||||
// Utility; bind a function to a "this" pointer
|
// Utility; bind a function to a "this" pointer
|
||||||
@ -52,12 +53,14 @@ define(
|
|||||||
// named methods on Angular modules, which follow the normal
|
// named methods on Angular modules, which follow the normal
|
||||||
// app.method(key, [ deps..., function ]) pattern.
|
// app.method(key, [ deps..., function ]) pattern.
|
||||||
function customRegistrar(angularFunction) {
|
function customRegistrar(angularFunction) {
|
||||||
var registered = {};
|
|
||||||
return function (extension, index) {
|
return function (extension, index) {
|
||||||
var app = this.app,
|
var app = this.app,
|
||||||
$log = this.$log,
|
$log = this.$log,
|
||||||
key = extension.key,
|
key = extension.key,
|
||||||
dependencies = extension.depends || [];
|
dependencies = extension.depends || [],
|
||||||
|
registered = this.registered[angularFunction] || {};
|
||||||
|
|
||||||
|
this.registered[angularFunction] = registered;
|
||||||
|
|
||||||
if (!key) {
|
if (!key) {
|
||||||
$log.warn([
|
$log.warn([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user