forked from Archives/Athou_commafeed
category formatting
This commit is contained in:
@@ -7,7 +7,8 @@ module.directive('category', function($compile) {
|
||||
selectedType: '=',
|
||||
selectedId: '=',
|
||||
feedClick: '&',
|
||||
categoryClick: '&'
|
||||
categoryClick: '&',
|
||||
formatCategoryName: '&'
|
||||
},
|
||||
restrict : 'E',
|
||||
replace: true,
|
||||
@@ -15,7 +16,7 @@ module.directive('category', function($compile) {
|
||||
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"></category>');
|
||||
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})"></category>');
|
||||
$compile(ul.contents())(scope);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user