title: Why should we use $sce.trustAsResourceUrl(iframeUrl)?
body: <p>I am new to AngularJS. I tried binding iframe src with Angular controller. </p>
  
  <p>html:</p>
  
  <pre><code>&lt;iframe class="mini-graph" ng-src="{{iframeUrl()}}"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>controller js:</p>
  
  <pre><code>$scope.iframeUrl = function(){
      return "http://www.google.co.in";
  };
  </code></pre>
  
  <p>This doesn't work. But if I change my controller to:</p>
  
  <pre><code>$scope.iframeUrl = function(){
      return $sce.trustAsResourceUrl("http://www.google.co.in");
  };
  </code></pre>
  
  <p>it works.</p>
  
  <p>I don't know what's the magic happens with <code>$sce.trustAsResourceUrl</code>. It would be great if some one could explain it.</p>