My attempt to implement expand and collapse functionality in AngularJS for a section is not yielding the desired result.
To demonstrate, I created a simple demo of collapsible/expandable sections in AngularJS which works fine. You can view it here. The example showcases the functionality with a collapsible/expandable first row.
I then applied the same concept to another example where I have a table with different sections such as GENERAL_INFORMATION and USER_INFORMATION that I want to collapse/expand. My code for this can be found here.
<tr ng-repeat="(key, value) in name">
<uib-accordion>
<div uib-accordion-group class="panel-default" is-open="status.open">
<uib-accordion-heading>
<td ng-if="value.type == 'LABEL'" colspan="2" style="background: #777; color: white;">
{{key}}
</td>
</uib-accordion-heading>
</div>
</uib-accordion>
<td ng-if="value.type == 'FIELD'">{{key}}
<span ng-if="value.required">
<sup class="required">*</sup>
</span>
</td>
<td ng-if="value.type == 'FIELD'"
>
{{value.value}}
</td>
</tr>
Any suggestions on how to improve this implementation?