javascript - Lazy load transcluded content -
so have accordion directive multiple transclusion slots, 1 title of accordion , 1 content. trying lazy load content transclusion slot of 'content' when click on title. possible? have manually save content text , inject later when title clicked?
const accordion = function() { return { restrict: 'e', scope: {}, templateurl: 'accordion.html', transclude: {title: 'accordiontitle', content: 'accordioncontent'}, link(scope, element, attrs, accordionctrl, transclude) { ???? } }; };
and template follows
<div class="accordion-title" ng-transclude="title"></div> <div class="accordion-content" ng-transclude="content"></div>
thanks
Comments
Post a Comment