循环ng-repeat列表以显示特定项目的项目

时间:2015-09-07 22:38:09

标签: javascript angularjs angularjs-ng-repeat ng-repeat

我有ng-repeat看起来像这样:

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

我的accountsView看起来像这样:

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

这给我一个看起来像这样的结果:

Chase
Checking
Chase
Savings
BofA
Credit

我希望它看起来像这样:

Chase
------
Checking
Savings

BoFa
------
Credit

我如何按照列表的显示方式执行此操作?

0 个答案:

没有答案