<tree-grid>
<thead> some content </thead>
<tbody>
<tree-row ng-repeat='row in rows' row='row'></tree-row>
</tbody>
<ng-transclude />
</tree-grid>
.directive('treeRow', ['$compile', function ($compile) {
return function createDirective() {
var treeController;
return {
restrict: 'E',
require: '^treeGrid',
scope: {
row: '='
},
templateUrl: 'components/treegrid/templates/row.html',
link: function (scope, element, attrs, gridController) {
treeController = gridController;
},
controller: function ($scope) {
$scope.expanded = false;
$scope.getColumnDisplayOrder = function () {
return treeController.getColumnDisplayOrder();
};
$scope.toggleExpand = function () {
$scope.expanded = !$scope.expanded;
};
$scope.hasChildren = function() {
return angular.isArray($scope.row.children);
};
}
};
}();
}]);
Hi,
Yes that’s what is happening. Thanks for confirming this.
No pro in custom HTML Elements here: if my <tree-row> element extends the HTMLTableRowElement (indicating it’s a <tr>), I suspect it might work (to be confirmed). For this (and other scenarios where I’d like to use a different HTMLElement type for my elements) I’d need to be able to set the prototype of the element.
Regards,
Fritz
Fritz Gerneth
![]()
|
funct GmbH Amalienstr. 39 D-80799 Munich |
T: +49-89 21 909 16 0 |
|
|
|
|
Managing director: |
Sascha Schwartz |
|
Company register: |
Amtsgericht München HRB 203304 |
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/angular/LtCrn5-RoOk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Hi,
Thanks for the input. Will try this out later on.
Thanks,
Fritz