Answer the question
In order to leave comments, you need to log in
How to access controller field from nested template?
Angular >=2
I am using ngx-accordion with markup like this:
<accordion>
<accordion-group *ngFor="...">
<accordion-heading>
{{isOpened}}
</accordion-heading>
</accordion-group>
</accordion>
Answer the question
In order to leave comments, you need to log in
through #group you take the contents of the entire class and pick up the value of group?.isOpen
<accordion-group #group>
<div accordion-heading>
I can have markup, too!
<i class="pull-right float-xs-right glyphicon"
[ngClass]="{'glyphicon-chevron-down': group?.isOpen, 'glyphicon-chevron-right': !group?.isOpen}"></i>
</div>
This is just some content to illustrate fancy headings.
</accordion-group>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question