*Ok so i made a filter cause you can include it in main module. Think using 5 modules "MainModule", "TableModule", "UserModule", "LoginModule", "ExampleModule".* *You can use this filter in any of 5 modules i exampled to you. You can have a "BaseModule" that can include filter "orderObjectBy" and all of your modules is gonna inherit that. My module basically transform $scope.customersByMonth from object to array and then sort it. function(items, filter, reverse) is gonna be:* *1. $scope.customersByMonth[month] = array of object of month * *2. month[0].MyDate = date of that month(a[0][filter] && b[0][filter]) //filter being "MyDate"* *3. if reverse = false or true*
*I know you can order your data from server, but in this case your data will be ordered by the front-end. You can do both of them or just one of them.* *I suggest doing both of them if you want to make a directive with this and public it. If you use just for your own scope you can do the server stuff.* *If any rows isn't clear just ask. I'll be glad to answer. * *Have a good night* -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
