[About] Support priority from mct-include

Support priority ordering from the mct-include directive
(such that the highest-priority template for a given key
is what gets included.) Needed to support variations among
application logos in the bottom right (depending on deployment.)
WTD-667.
This commit is contained in:
Victor Woeltjen
2015-01-14 10:51:38 -08:00
parent 9a400f6fba
commit b5ebe5b27f

View File

@ -37,12 +37,14 @@ define(
// Prepopulate templateMap for easy look up by key // Prepopulate templateMap for easy look up by key
templates.forEach(function (template) { templates.forEach(function (template) {
var path = [ var key = template.key,
template.bundle.path, path = [
template.bundle.resources, template.bundle.path,
template.templateUrl template.bundle.resources,
].join("/"); template.templateUrl
templateMap[template.key] = path; ].join("/");
// First found should win (priority ordering)
templateMap[key] = templateMap[key] || path;
}); });
function controller($scope) { function controller($scope) {