https://jsfiddle.net/by2jax5v/171/
我正在使用$sce.trustAsHtml来渲染$scope.content
$scope.bindHTML = $sce.trustAsHtml($scope.content);
https://jsfiddle.net/by2jax5v/171/
我正在使用$sce.trustAsHtml来渲染$scope.content
$scope.bindHTML = $sce.trustAsHtml($scope.content);
你想要实现的目标可以通过使用francis bouvier的ng-html-compile而不是ng-bind-html来实现.它是我见过的最薄的库,只有1kb. https://github.com/francisbouvier/ng_html_compile