Is there a way to dynamically change the color of an accordion based on the status of the current item in the list?
I'm trying to implement something like ng-class="{status: item.status}"
(where I have set testClass: true
)
The issue I'm facing is that I can't figure out how to apply the color to the entire accordion heading.
<accordion>
<accordion-group ng-repeat="item in items" class="animate-repeat" is-open="status.open">
<accordion-heading>
<div ng-class="{testClass: true}">
<p>Test</p>
</div>
</accordion-heading>
<div class="row">
<div class="col-sm-12 col-xs-12">
<div class="text-content font-size-14">{{item.text}}</div>
</div>
</div>
</div>
</accordion-group>
</accordion>
CSS
.testClass {
background-color: burlywood;
}
https://i.sstatic.net/SnkVY.png
Any suggestions on how to solve this dilemma?
I encountered a similar problem which was discussed here, but unfortunately, the solution provided didn't work for me: https://github.com/angular-ui/bootstrap/issues/3038
Fiddle Link: http://jsfiddle.net/f8ce1b0w/2/