【备忘录】angularjs在标签中添加html
Js:
$scope.renderHtml = function (html_code) {
return $sce.trustAsHtml(html_code);
};
Html:
<p ng-bind-html="renderHtml(value.button)"></p>
Js:
$scope.renderHtml = function (html_code) {
return $sce.trustAsHtml(html_code);
};
Html:
<p ng-bind-html="renderHtml(value.button)"></p>