My AngularJs filter code behaves as expected when returning the full list:
return function(list){
return list;
}
However, when trying to return the length of the list, an error is thrown saying "Error while interpolating {{ list | filterName}}...TypeError: list is undefined"
return function(list){
return list.length;
}
I am puzzled by why the 'list' variable becomes undefined briefly during the execution of this function. Any suggestions on resolving this issue would be appreciated since it still returns the desired value despite the console error.