I have defined a filter as follows
@angular.module('extcomFilters',[]).filter('status_icon',()->
(input) ->
if input <=0
"<i class='icon-thumbs-down'></i>"
else
"<i class='icon-thumbs-up'></i>"
)
so depending on the status, I can get one icon or the other one. I'm using it inside a span tag using the ng-bind-html-unsafe directive:
<span data-ng-bind-html-unsafe="{{status | status_icon}}"></span>
Instead of having the icon displayed inside the span element, I'm getting this:
<span data-ng-bind-html-unsafe="<i class='icon-thumbs-up'></i>"></span>
Any idea of what I'm doing wrong?
Thanks!!