Skip to content

Instantly share code, notes, and snippets.

@Anzumana
Created August 26, 2016 06:17
Show Gist options
  • Save Anzumana/c3c806c647e330f046d465c640bde9d9 to your computer and use it in GitHub Desktop.
Save Anzumana/c3c806c647e330f046d465c640bde9d9 to your computer and use it in GitHub Desktop.
for(var i = 0 ; i < $scope.data.filteredLinesArray.length ; i++){
if(!($scope.data.filteredLinesArray[i].currentChanges.length > 0)){
$scope.data.filteredLinesArray.splice(i,1);
//reset index else we miss elements of the array since we use splice to removed an element
i = -1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment