Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/468.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 以角度从对象获取值_Javascript_Angularjs_Object - Fatal编程技术网

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));