*Ok so i made a filter cause you can include it in BaseModule. Think using 
5 modules "MenuModule", "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 are gonna inherit that. *

*My filter basically  transform $scope.customersByMonth from object to 
array and then sort it. "function(items, filter, reverse)"  params are 
gonna be:*
*1. $scope.customersByMonth[month] = array of object of month               
                         (params.items)*
*2. 'MyDate' = date of that month(a[0][filter] && b[0][filter]) //filter 
being "MyDate"                 (params.filter)*
*3. if reverse = false or true                                             
                                                     (params.reverse)*

*You can console.log() them to see what is going on.*

*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 nice day*

-- 
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.

Reply via email to