Is it possible to create an HTML fragment in an AngularJS controller and have this HTML shown in the view?
This comes from a requirement to turn an
on html
OR on controller mySceApp.controller("myAppController", function myAppController( $sce) { this.myCtrl.comment.msg = $sce.trustAsHtml(html); works also with $scope.comment.msg = $sce.trustAsHtml(html); 0 讨论(0) 查看其它18个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
OR
on controller
mySceApp.controller("myAppController", function myAppController( $sce) { this.myCtrl.comment.msg = $sce.trustAsHtml(html);
works also with $scope.comment.msg = $sce.trustAsHtml(html);
$scope.comment.msg = $sce.trustAsHtml(html);