title: getting 'nativeElement.querySelector is not a function' exception in Angular2
body: <p>I'm trying to access a div in Angular2 like below:</p>
  
  <pre><code>import { Component, ViewChild, ElementRef, AfterContentInit } from '@angular/core';
  
  @Component({
      selector: 'main',
      template: `
      &lt;div  #target class="parent"&gt;
          &lt;div class="child"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
    `
  })
  
  export class MainComponent implements AfterContentInit {
      @ViewChild('target') elementRef: ElementRef;
  
      ngAfterContentInit(): void {
          var child = this.elementRef.nativeElement.querySelector('div');
          console.log(child);
      }
  }
  </code></pre>
  
  <p>but I get the following exception:</p>
  
  <blockquote>
    <p>Exception: Call to Node module failed with error: TypeError:
    this.elementRef.nativeElement.querySelector is not a function</p>
  </blockquote>