From eed299a31b5a6dd0363133c5f9271bf33d090c94 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 20 Aug 2013 16:31:09 -0700 Subject: fix(ngTransclude): clear the translusion point before transcluding when the transluded content is being teleported to the translusion point, we should ensure that the translusion point is empty before appending otherwise we end up with junk before the transcluded content --- src/ng/directive/ngTransclude.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ng/directive/ngTransclude.js b/src/ng/directive/ngTransclude.js index 0b9b919d..71d0635a 100644 --- a/src/ng/directive/ngTransclude.js +++ b/src/ng/directive/ngTransclude.js @@ -5,7 +5,9 @@ * @name ng.directive:ngTransclude * * @description - * Insert the transcluded DOM here. + * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion. + * + * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted. * * @element ANY * @@ -58,6 +60,7 @@ var ngTranscludeDirective = ngDirective({ link: function($scope, $element, $attrs, controller) { controller.$transclude(function(clone) { + $element.html(''); $element.append(clone); }); } -- cgit v1.2.3