title: AngularJS 2 Dynamically search div for id and add new div
body: <p>How I can search for an item by <code>id</code>, and add other elements inside, programmatically?</p>
  
  <p>I searched the web, and on the website of angularjs2 but I can not find any example, not if the fault is that I am doing wrong or there to do otherwise to do this.</p>
  
  <pre><code>@Component({
      selector: "testcomponente",
      template: `
      //other code  
      &lt;div class = "container" id = "table1" &gt;
  
      &lt;/div&gt;
      `
   })
  
  
  export class Mov {
  .//
  t(){
     var iDiv = document.createElement('div');
     iDiv.id = 'block';
     iDiv.className = 'block';
     var t : any = document.getElementsById('table1').appendChild(iDiv); &lt;-- error
     .//
  }
  </code></pre>
  
  <p>I have this error when compiling:</p>
  
  <pre><code>error TS2339: Property 'getElementsById' does not exist on type 'Document'.
  </code></pre>
  
  <p>any example or link is appreciated, and sorry for my English.</p>