After reading AngularJS tutorial step-9 I have created my own AngularJS filter, which should convert boolean data into html.
Here is my filter code:
unless I am reading it wrong, you are approaching in the wrong way
I think ng-class is directive you need for this job and is safer then rendering to class attribute.
in your case just add object string with the id strings as the class and the value as the evaluated expression
'
on a side note, you should only use directives (built-in and custom) to manipulate html/dom and if you needed a more complex html render you should look at directive instead