changed order of ng-repeat filter and add _sortCategoriesByPopularity to sort categories by popularity