Javascript 以角度从对象获取值
内部控制器Javascript 以角度从对象获取值,javascript,angularjs,object,Javascript,Angularjs,Object,内部控制器 $scope.html = $sce.trustAsHtml('This is my html'); $scope.showpopup = function(scopVar,data){ console.log(data); } 在模板中: <h2 ng-click ="showpopup('html',html)" ng-bind-html="html" ></h2> 那么我如何才能得到实际值(即这是我的html) 文件可在以下网址找到: Th
$scope.html = $sce.trustAsHtml('This is my html');
$scope.showpopup = function(scopVar,data){
console.log(data);
}
在模板中:
<h2 ng-click ="showpopup('html',html)" ng-bind-html="html" ></h2>
那么我如何才能得到实际值(即这是我的html)
文件可在以下网址找到:
This is my html {$$unwrapTrustedValue=function(), valueOf=function(), toString=function()}
console.log($sce.getTrustedHtml(data));