从$scope angularJS中删除$sce.trustAsHtml对象
我有这个密码 var VisualEditor=angular.moduleVisualEditor[ngSanitize]; 控制器'VisualEditorController',函数$scope,$sce{ $scope.Pages=[ $sce.trustAsHtml'x从$scope angularJS中删除$sce.trustAsHtml对象,html,angularjs,controller,Html,Angularjs,Controller,我有这个密码 var VisualEditor=angular.moduleVisualEditor[ngSanitize]; 控制器'VisualEditorController',函数$scope,$sce{ $scope.Pages=[ $sce.trustAsHtml'x在此处编写文本, $sce.trustAsHtml'x在此处编写文本' ]; $scope.DeletePage=函数索引{ $scope.Pages.index,1; };这已经在这里的SO帖子中得到了询问和回答:G
在此处编写文本
, $sce.trustAsHtml'x在此处编写文本
' ]; $scope.DeletePage=函数索引{ $scope.Pages.index,1;};这已经在这里的SO帖子中得到了询问和回答:GL!@Shehryar我想在ng上删除单击x,但当我单击它时,它不会删除元素。EMM,看看这个提琴:拼接部分使用JSON数据。你可能想检查一下你使用$sce的方式。你在控制台中看到任何错误吗?你看到你看到的渲染片段了吗ve在$sce.trustAsHtml//代码片段中?此外,请查看$sce.trustAsHtml的这篇SO帖子usage@Shehryar我不想使用{{person.name}}来显示HTML标记,除非我想在$scope中保存EMM并在页面上显示它,这可以通过在$scope中保存$sce.trustAsHtml'EMM'来完成