angular-ellipsis icon indicating copy to clipboard operation
angular-ellipsis copied to clipboard

Content with HTML tag not working..

Open ghost opened this issue 9 years ago • 2 comments

@dibari i have content in which there are p, pre, span, ul li and other html tag. Which i am assign from the controller using ng-bind-html. In this case full content not is visible.

$scope.paragraphText = "Four score and seven years ago our <pre>fathers brought forth on this continent</pre>, a new nation, <p>conceived in Liberty</p>, <a href='http://google.com'>and</a> dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live."

Output:- With HTML Tag-- with html tag Without HTML Tag-- without html tag

ghost avatar Jul 13 '16 08:07 ghost

In addition. When I try to use data-ng-bind-html i´m getting a nice html result but also an error:

sin titulo

MiguelRozalen avatar Aug 12 '16 09:08 MiguelRozalen

Try to use this https://docs.angularjs.org/api/ng/service/$sce#trustAsHtml

DzmVasileusky avatar Jun 16 '17 17:06 DzmVasileusky