added complete tree

This commit is contained in:
Athou
2013-03-22 22:11:40 +01:00
parent 31f6687b38
commit 87000b0e11
8 changed files with 128 additions and 115 deletions

View File

@@ -15,14 +15,12 @@ module.directive('category', function($compile) {
replace: true,
templateUrl: 'directives/category.html',
link: function(scope, element) {
if (scope.node.children) {
var ul = element.find('ul');
ul.prepend('<category ng-repeat="child in node.children" node="child" feed-click="feedClick({id:id})" \
category-click="categoryClick({id:id})" selected-type="selectedType" selected-id="selectedId" \
format-category-name="formatCategoryName({category:category})" format-feed-name="formatFeedName({feed:feed})">\
</category>');
$compile(ul.contents())(scope);
}
var ul = element.find('ul');
ul.prepend('<category ng-repeat="child in node.children" node="child" feed-click="feedClick({id:id})" \
category-click="categoryClick({id:id})" selected-type="selectedType" selected-id="selectedId" \
format-category-name="formatCategoryName({category:category})" format-feed-name="formatFeedName({feed:feed})">\
</category>');
$compile(ul.contents())(scope);
}
};
});