Change the property of element inside iframe in angular 2
<p>I would like to change the property of an element inside iframe in <strong>angular 2 typescript</strong> similar to the javascript code</p>

<p><code>document.getElementById('iframeId').window.document.getElementById('home-grid').style.visibility = "hidden";</code> </p>

<p>My Angular typescript code:</p>

<pre><code>var iframe   = document.getElementById('iframeId');
var insideDoc = iframe.contentDocument || iframe.contentWindow.document;
</code></pre>

<p>Error on compiling the code:</p>

<pre><code>stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^
 Error: ./angularapp/web/component/mainPage/mainPage.ts
←[37m(←[39m←[36m35←[39m,←[36m32←[39m): ←[31merror TS2339: Property 'contentDocument' does not exist on type 'HTMLElement'.←[39m./angularapp/web/component/mainPage/mainPage.ts
←[37m(←[39m←[36m35←[39m,←[36m58←[39m): ←[31merror TS2339: Property 'contentWindow' does not exist on type 'HTMLElement'.←[39m
</code></pre>

<p>Is there any way to achieve this in angular 2? Please help</p>