Q:

Issue of convertHtml data missing

Have you guys faced the data loss after converted HTML to pdf? Here is my problem.
$scope.current.clause_note = '<ul><li>This is for testing <strong>TINTERIOR WORKS</strong></li></ul><p><br></p>'

$scope.current.clause_note = self.convertHtml($scope.current.clause_note);

The result remained the TINTERIOR WORKS strong parts and other tags were missing.
How to ensure all the contents convert to pdf without data loss?

A:

Use $sce as shown below.

var app = angular.module('myApp', []);

app.controller('MyController', function MyController($scope, $sce) {
 $scope.current = '<ul><li>This is for testing <strong>TINTERIOR WORKS</strong></li></ul><p><br></p>'

 $scope.current = $sce.trustAsHtml($scope.current);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<div ng-controller='MyController' ng-app="myApp">
    <div ng-bind-html="current"></div>
</div>

