How to output html through AngularJS template?

后端 未结 5 2049
醉梦人生
醉梦人生 2020-12-15 16:27

{{ revision.title }}

The title outputs fine, but the content - does

5条回答
  •  庸人自扰
    2020-12-15 17:08

    So the fix is this:

    include angular-sanitize.min.js from http://code.angularjs.org/ and include it in your module:

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

    and then you're free to use ng-bind-html

提交回复
热议问题