Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 3f6ab44

Browse files
committed
Bring back the transclusion. Close #285.
The workaround to prevent issue #90 is revealed here, after fair amount of googling: angular/angular.js#5703 Since Angular 1.2.1 we can pass $scope as first argument to $transclude, to prevent it from creating a new scope. We now require Angular >= 1.2.1.
1 parent 812eafa commit 3f6ab44

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

angular-kendo.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@
136136
// // XXX: Is this transclusion needed? We seem to do better without it.
137137
// // https://github.com/kendo-labs/angular-kendo/issues/90
138138
//
139-
// transclude: true,
140-
// controller: [ '$scope', '$attrs', '$element', '$transclude', function($scope, $attrs, $element, $transclude) {
141-
// // Make the element's contents available to the kendo widget to allow creating some widgets from existing elements.
142-
// $transclude(function(clone){
143-
// $element.append(clone);
144-
// });
145-
// }],
139+
transclude: true,
140+
controller: [ '$scope', '$attrs', '$element', '$transclude', function($scope, $attrs, $element, $transclude) {
141+
// Make the element's contents available to the kendo widget to allow creating some widgets from existing elements.
142+
$transclude($scope, function(clone){
143+
$element.append(clone);
144+
});
145+
}],
146146

147147
link: function(scope, element, attrs, controllers) {
148148

0 commit comments

Comments
 (0)