just a quick Question!
I have an ordering function, which is supposed to order two arrays depending on the situation. So i pass the array reference, but the array is not filtered! Any ideas?
function order(rowName, array) {
    if (vm.row === rowName) {
        return;
    }
    vm.row = rowName;
    array = $filter('orderBy')(array, rowName);
    return vm.onOrderChange();
};
which is called in my html as :
data-ng-click = "vm.order('amount', vm.itemsNew)"
i got it working like below, but... well, i don't like it!
function order(rowName, array) {
    if (vm.row === rowName) {
        return;
    }
    vm.row = rowName;
    if (array === vm.itemsNew)
        vm.itemsNew = $filter('orderBy')(vm.itemsNew, rowName);
    else
        vm.itemsGeneric = $filter('orderBy')(vm.itemsGeneric, rowName);
    return vm.onOrderChange();
};
 
     
     
    