I am trying to create a function that changes the awesome icon before the test based on what the text is.
I can't get it to read the html from the return. I have attach an image of what I am trying to create.
field: "ProductName", title: "Status", template: " {{ setStatus(dataItem.ProductName) }} #=ProductName# "
$scope.setStatus = function(name) {
if (name === 'Chai') {
return "<i class='fa fa-check-circle' style='color:green; font-size: 150%'></i>";
}
else if (name === 'Chang') {
return "<i class='fa fa-times-circle' style='color:red; font-size: 150%'></i>";
}
}