I am using a filter to show some values in a table. Values fetching by ajax calls and I want to show a spinner while the values are fetching. So I wrote:
app.filter("fetchedValue", function(){
return function(fetchedValue){
if(angular.isUndefined(fetchedValue)){
return "image";//this is the spinner
}else if(fetchedValue === null){
return "NA";
}
else{
return fetchedValue;
}
}
});
It is not working. I am not sure how to get the spinner when the value is undefined. Does anybody know how to do it?