Skip to main content
added 44 characters in body
Source Link
Taiwei Tuan
  • 1.2k
  • 1
  • 9
  • 19

Use filter:

// Filter to enable HTML tags
app.filter('unsafe', function ($sce) {
    return function (val) {
        return $sce.trustAsHtml(val);
    };
});

Then include this within your HTML tag along with filter ('unsafe' in this case), for example:

<!-- i.detail will be your valuable -->
<div ng-bind-html="i.detail|unsafe"><detail | unsafe"></div>

Use filter:

// Filter to enable HTML tags
app.filter('unsafe', function ($sce) {
    return function (val) {
        return $sce.trustAsHtml(val);
    };
});

Then include this within your HTML tag, for example:

<!-- i.detail will be your valuable -->
<div ng-bind-html="i.detail|unsafe"></div>

Use filter:

// Filter to enable HTML tags
app.filter('unsafe', function ($sce) {
    return function (val) {
        return $sce.trustAsHtml(val);
    };
});

Then include this within your HTML tag along with filter ('unsafe' in this case), for example:

<!-- i.detail will be your valuable -->
<div ng-bind-html="i.detail | unsafe"></div>
Source Link
Taiwei Tuan
  • 1.2k
  • 1
  • 9
  • 19

Use filter:

// Filter to enable HTML tags
app.filter('unsafe', function ($sce) {
    return function (val) {
        return $sce.trustAsHtml(val);
    };
});

Then include this within your HTML tag, for example:

<!-- i.detail will be your valuable -->
<div ng-bind-html="i.detail|unsafe"></div>