#83 Group By

Did you ever want to display a list of items grouped by a certain property?  I am building an admin backend for hirejs.com and wanted to group jobs by status e.g. pending/approved/declined/expired etc…  I did it with the help of the ember-group-by addon (yes, there is an addon for that).

Install addon

Add a grouped-by property to your controller:

And in the template, I can loop over the groups and their items with:


Also published on Medium.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu