angularJS ng-src with trustAsResourceURL
<p>I am trying to create an iframe in my webpage with <code>ng-src="localhost/test/public/getreportsdata/1"</code>. I used the trust source function <code>$sce.trustAsResouceUrl</code> and that's to open the result of the service in the iframe.</p>

<p>I tested it on my laptop it worked, now on my desktop it giving me :</p>

<blockquote>
  <p>cannot read property 'trustAsResourceUrl' of undefined</p>
</blockquote>

<p>My html iframe :</p>

<pre><code>&lt;iframe width="800" height="800" ng-src="{{trustSrc(reportbydateresource.src)}}"&gt;&lt;/iframe&gt; 
</code></pre>

<p>My js code :</p>

<pre><code>angular.module('backOfficeApp')
.controller('CheckReportsCtrl', CheckReportsCtrl);
CheckReportsCtrl.$inject=['$scope','$http','$filter'] ;
function CheckReportsCtrl($scope,$http,$filter,$sce){
$scope.trustSrc = function (src){
return $sce.trustAsResourceUrl9src); };
$scope.reportbydateresouce={src:"localhost/test/public/getreportsdata/1"}
</code></pre>

<p>Any idea ?</p>