Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: using bindonce and still being able to orderBy #114

Open
itsgoofer opened this issue Dec 16, 2014 · 2 comments
Open

question: using bindonce and still being able to orderBy #114

itsgoofer opened this issue Dec 16, 2014 · 2 comments

Comments

@itsgoofer
Copy link

I have a question, I have been playing around with bindonce and I realized it let's me orderBy within ngRepeat based tables. I'm not sure if this is supposed to happen since the data passed to the ngRepeat should be displayed once and unbound.

<tr bindonce ng-repeat="invoice in invoices.all() | orderBy :order:reverse">
   <td class="data-cell" bo-text="invoice.invoice_date | date : 'MMM d, y'"></td>
   <td class="data-cell" bo-text="invoice.invoice_hash"></td>
   <td class="data-cell right" bo-text="invoice.amount_due / 100 | currency"></td>
   <td class="data-cell right" bo-text="invoice.paid ? 'Paid' : 'Unpaid'"></td>
</tr>
@itsgoofer
Copy link
Author

Any ideas?

@gacha
Copy link

gacha commented Feb 27, 2015

You can use filters in controller $filter('orderBy')($scope.invoices.all(), 'order')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants