I have a string in java,I need to append html tag to it dynamically so that when displayed in the frond it,the html tags behavior is felt.
String content="Hello World,this is a test content to demonstrate the requirement";
In the above string content is wrapped inside the tag.But when I am trying to display it in angularjs front end,the string is not taking the tag behavior and displayed as "Hello World,this is a test content to demonstrate the requirement".
use angular-sanitize.js for the same - example
<div ng-controller="testCtrl"> <div ng-bind-html="stringTest"></div> </div>