<div ng-bind-html="slideContent"></div>
哪里
this.$scope.slideContent = this.$sce.trustAsHtml("<img src='1.jpg' style='width: 231px'></img>");
angular删除样式属性,因此图像具有初始大小.你怎么看?我怎么能避免这个?
谢谢!
$scope.trustedHtml = function (plainText) { return $sce.trustAsHtml(plainText); }
<div ng-bind-html="trustedHtml(resultList.section)"></div>