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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -