im taking first steps in angular, and i need to return array excluding empty spaces in it. i was able to create function to return the array i want, spliced, but couldn't find a way to make sure each cell in the array contains a value. this is my function:
$scope.letters = function(arr) {
var lettersarray = arr.split('');
return lettersarray;
};
is there a way to do it in angular?
- i know a way in jquery but understood its not recommended to mix both so im looking for an "angularish" way to do it..thx