Skip to content

Commit c7fe6b4

Browse files
author
Lucas Castro
committed
Fixed issue that can cause the transclusion template to be overwritten.
1 parent e476017 commit c7fe6b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

directives/custom-control.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
* build a custom control element
4040
*/
4141
var customControlEl = element[0].parentElement.removeChild(element[0]);
42-
var content = $transclude();
43-
angular.element(customControlEl).append(content);
42+
$transclude(scope, function(clone) {
43+
angular.element(customControlEl).append(clone);
44+
});
4445

4546
/**
4647
* set events

0 commit comments

Comments
 (0)