[Representation] Hide elements without transclusion

This commit is contained in:
Victor Woeltjen
2015-10-28 15:29:57 -07:00
parent ab008ae497
commit bcc42d705e
3 changed files with 29 additions and 47 deletions

View File

@ -57,15 +57,11 @@ define(
function MCTInclude(templates, templateLinker) {
var templateMap = {};
function link(scope, element, attrs, ctrl, transclude) {
var changeTemplates = templateLinker.link(
scope,
element,
transclude
);
function link(scope, element) {
var changeTemplate = templateLinker.link(scope, element);
scope.$watch('key', function (key) {
changeTemplates(templateMap[key]);
changeTemplate(templateMap[key]);
});
}
@ -82,12 +78,6 @@ define(
});
return {
transclude: 'element',
priority: 601,
terminal: true,
// Only show at the element level
restrict: "E",