I want to filter and display HTML currency codes.
So my function gets the code name and returns the HTML code that match:
vm.filterCurrencyCode = function(currncey){
console.log(currncey);
if( currncey === ''|| angular.isUndefined(currncey)){
return '₪'; // default
}
else if(currncey == 'USD' || currncey == 'CAD'){
return '$'; //usd
}
else if(currncey == 'GBP' || currncey == 'GBp'){
return '£'; //gbp
}else{
return currncey; //return name
}
}
And in my HTML:
<td data-toggle="collapse" href="#collapse{{$index}}">{{vm.filterCurrencyCode(nia.CurrencyCode)}}</td>
But instead of the matching HTML symbol, the page display's the string - '₪'
.