JavaScript Code-
<script
type="text/javascript">
var app
=angular.module('App',
["ngSanitize"]);
app.controller('AppCtrl',
['$scope', '$sce',
function($scope,
$sce){
$scope.name
="";
$scope.processHtmlCode=function()
{
$scope.trustedMessage
= $sce.trustAsHtml($scope.name
);
}
}]);
</script>
HTML code-
<span
ng-bind-html="trustedMessage"></span>
I hope you are enjoying with this post! Please share with you friends. Thank you so much!