diff --git a/h/js/directives.coffee b/h/js/directives.coffee index 700cbbf5711..0c6f29ac939 100644 --- a/h/js/directives.coffee +++ b/h/js/directives.coffee @@ -35,12 +35,15 @@ annotation = ['$filter', ($filter) -> recursive = ['$compile', ($compile) -> - compile: (tElement, tAttrs) -> - linkRec = $compile tElement.contents().remove(), (scope, cloneAttachFn) -> - linkRec scope, cloneAttachFn + compile: (tElement, tAttrs, transclude) -> + transclude = $compile tElement, (scope, cloneAttachFn) -> + transclude scope, cloneAttachFn + , 1000 post: (scope, iElement, iAttrs, controller) -> - linkRec scope, (contents) -> iElement.append contents + transclude scope, (el) -> iElement.replaceWith el + priority: 1000 restrict: 'A' + terminal: true ] diff --git a/h/templates/viewer.html b/h/templates/viewer.html index 254f72145d0..ce8bb2237ee 100644 --- a/h/templates/viewer.html +++ b/h/templates/viewer.html @@ -16,9 +16,9 @@