Ok, so I have a basic variable.
$scope.categoryHeader = "";
I'm trying to group lists by their category. How do I update the variable from the view? Or is there a better way to accomplish this?
<div ng-app="SharePointAngApp" class="row" style="color:white">
<div ng-controller="spCustomerController">
<ul ng-repeat="item in items">
<div ng-if="item.Category.Title != categoryHeader" ng-change="categoryHeader = item.Category.Title">
<h4>{{item.Category.Title}}</h4>
</div>
<li>
<a href="{{item.File.ServerRelativeUrl}}">{{item.Title}}</a>
</li>
</ul>
</div>
</div>
Example
Category1
- item1
item2
Category2
item3
*Edit
The solution provided below is the best and simplest solution to my question. The other post's solution did not work within the confines of my page.