How do I format text from my controller?


ionic noob here, trying to format some text using the Angular Sanitizer.

Please see the codepen at

I’m trying to format the body using trustAsHtml(), but obviously I’m missing something…

Please help :slight_smile:

  • Thanks a lot!


Maybe the i-tag style is overwritten by css?
Look in your sourcecode the i-tag is correctly there.

html in bind-as-html

not using sanatizer/ using sanatizer and b, a -tag



Ah, yes, of course. Thanks for pointing that out :smile: