title: How to set the iframe content height in my case?
body: <p>I am trying to setup the iframe content height through angular</p>
  
  <p>I have something like</p>
  
  <pre><code>&lt;iframe id='iframe' width='100%' height='600px' data-ng-init="init('iframe')" 
   src='http://test.com' /&gt;
  </code></pre>
  
  <p>in my controller</p>
  
  <pre><code> $scope.init = function(id) {
              console.log($('#'+ id))  -&gt; show my iframe
              var x= $('#'+ id)..contentWindow.document.body.scrollHeight;
              console.log(x) -&gt; gives me undefined
  
              var y = $('#'+ id)..contentWindow;
              console.log(y) -&gt; give me undefined too 
          }
  </code></pre>
  
  <p>How do I set the iframe content height through my controller? </p>
  
  <p>Thanks!</p>