user3255061 user3255061 - 1 month ago 7x
AngularJS Question

AngularUI Bootstrap: Parse HTML in carousel text

I'm trying to implement an Angular UI Bootstrap Carousel and have HTML in the texts. Thought I could use something like

text: $sce.trustAsHtml('Nice image <br />test')

but apparently that doesn't work and I've no clue why.

Plunkr: (fork of the offical example from the docs).


Use ng-bind-html directive to display html content on view

<p ng-bind-html="slide.text"></p>

Demo Plunkr