I'm new to Angular so this is a question about best practices and separation of concerns.
Let's say I have the following setup
<div ng-controller='SomeCtrl'>
<div ng-repeat="item in list">
<div class='item'>
{{ item.name }}
</div>
</div>
</div>
Let's say that each 'item' can be either expanded or collapsed in the view. So for each item there is a boolean for the state. Is it appropriate to have expanded = [...booleans...]
in the controller and use ng-class="{ active: expanded[index] }"
on each view?
I am not sure where to keep the expanded state of each item.