I am currently working on creating two custom elements: <accordion>
and <accordion-group-active>
.
.directive('accordion', function () {
return {
restrict: 'E',
replace: true,
transclude: true,
template: "<div class=\"accordion\" ng-transclude> \
</div>"
}
})
In addition,
.directive('accordion-active-group', function() {
return {
restrict: 'E',
replace: true,
transclude: true,
template: "<div class=\"title\" > \
<i class=\"dropdown icon\"></i> \
{{heading}} \
</div>"
}
})
Can you help me figure out why my output looks like this:
<div class="accordion">
<accordion-active-group class="ng-scope">test</accordion-active-group>
<accordion-active-group class="ng-scope">test2</accordion-active-group>
<accordion-active-group class="ng-scope">test3</accordion-active-group>
</div>
When I am expecting it to look like this:
<div class="accordion">
<div> ... </div>
<div> ... </div>
<div> ... </div>
</div>
Thank you for your assistance.