1

I have an ng-repeat that looks like this:

<div class="row" ng-repeat="account in accountsView">
    {{account.BankName}}
    {{account.AccountName}}
</div>

My accountsView looks like this:

0: Object
AccountBalance: 1234.27
AccountName: "Checking"
AccountOid: 1
BankName: "Chase"
BankOid: 1
BusinessOid: 1
1: Object
AccountBalance: 6590.31
AccountName: "Savings"
AccountOid: 2
BankName: "Chase"
BankOid: 1
BusinessOid: 1
2: Object
AccountBalance: 7653.84
AccountName: "Credit"
AccountOid: 3
BankName: "BofA"
BankOid: 1
BusinessOid: 1

This gives me a result that looks like this:

Chase
Checking
Chase
Savings
BofA
Credit

What I would like it to look like is this:

Chase
------
Checking
Savings

BoFa
------
Credit

How would I do this with the way my list looks?

suvartheec
  • 3,484
  • 1
  • 17
  • 21
  • 8
    possible duplicate of [How can I group data with an Angular filter?](http://stackoverflow.com/questions/14800862/how-can-i-group-data-with-an-angular-filter) – Alexis King Sep 07 '15 at 22:46
  • 1
    you'll need to write a custom filter to group the records. see http://stackoverflow.com/questions/19992090/angularjs-group-by-directive among many other similar answers. – Claies Sep 07 '15 at 22:47

0 Answers0