save sort_by state in rootScope