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

Js:
$scope.renderHtml = function (html_code) { return $sce.trustAsHtml(html_code); };
Html:
<p ng-bind-html="renderHtml(value.button)"></p>
 
posted @ 2014-11-30 16:57  xiaoroad  阅读(684)  评论(0编辑  收藏  举报