[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
templates.forEach(function (template) {
var path = [
template.bundle.path,
template.bundle.resources,
template.templateUrl
].join("/");
templateMap[template.key] = path;
var key = template.key,
path = [
template.bundle.path,
template.bundle.resources,
template.templateUrl
].join("/");
// First found should win (priority ordering)
templateMap[key] = templateMap[key] || path;
});
function controller($scope) {