"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const aurelia_framework_1 = require("aurelia-framework");
class ControlNameResolver {
static getNameForControl(control) {
let found = null;
if (!control || !control.name || !control.name.length) {
return null;
}
if (this.nameCache[control.name] !== undefined) {
return this.nameCache[control.name];
}
aurelia_framework_1.PLATFORM.eachModule((m, v) => {
if (v[control.name] === control)
found = m;
return true;
});
this.nameCache[control.name] = found;
return found;
}
}
ControlNameResolver.nameCache = [];
exports.ControlNameResolver = ControlNameResolver;
//# sourceMappingURL=ControlNameResolver.js.map |