Sortby category groupby category angularjs ng-repeat

Posted: March 9, 2015 in web
<div ng-repeat="obj in listOfArray| groupBy:'year' | toArray:true | orderBy:'-$key'" class = "item item-divider">
                    <span ng-click="toggleYear(obj.$key)">
                        <i class="icon" ng-class="accordionYears[obj.$key] ? 'ion-ios-minus-outline' : 'ion-ios-plus-outline'" class="ion-ios-minus-outline"></i>
                        <span class="invoice-year">{{obj.$key}}</span>
                    </span>
                    <div ng-show="accordionYears[obj.$key]" ng-repeat="data in obj" >
                        <a class = "item item-icon-right" href="#">
                            <span>{{data.object.createDate| date}}</span><span>{{data.object.total| currency:"$"}}</span>
                            <i class="icon m-arrow-down"></i>
                        </a>
                    </div>
                </div>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s