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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -