I have the following code that outputs the length of an array, deletes it, and then outputs the new length:
console.log($scope.adviceList.activeAdvices.lengt
It's because delete on array element set it to undefined so the length don't change. Use splice function instead:
splice
a = [1,2,3,4]; a.splice(2,1); console.log(a.length);