Angular 转义显示HTML

 <script src="angular.js"> 

 <script src="angular-sanitize.js">


angular.module('app', ['ngSanitize']); 

function Ctrl($scope, $sce){...}

$sce.trustAsHtml($scope.snippet);


你可能感兴趣的:(Angular)