Sophie Sophie - 1 year ago 79
HTML Question

HTML break line using <br> tag in <p> tag

In my HTML, I am using to show some text, like this:

<p> {{}} </p>

And here is the sample of bio object:

"bio": "A<br>B<br>C<br>D<br>E<br>F"

I was expecting that I'll get each and every alphabet in separate lines, but worst thing is when I run my HTML, showing me text as it is written with

Answer Source

Evaluates the expression and inserts the resulting HTML into the element in a secure way. Use ngSanitize in your module's dependencies.

Your code would we like:

<p ng-bind-html=""></p>

For more details read here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download