我想将属性添加trust到一个 XML 中。我的问题是,目前我有 as valuea string,所以我无法使用以下代码:
trusted (escaped) {
escape.filter('to_trusted', ['$sce', function($sce) {
return function(text) {
return $sce.trustAsHtml(text);
}
}]);
}
Run Code Online (Sandbox Code Playgroud)
是否可以将 a 转换string为 a XML?我想转换escaped。