首页 > 代码库 > 【备忘录】angularjs在标签中添加html

【备忘录】angularjs在标签中添加html

Js:
$scope.renderHtml = function (html_code) { return $sce.trustAsHtml(html_code);};
Html:
<p ng-bind-html="renderHtml(value.button)"></p>
 

【备忘录】angularjs在标签中添加html