title: How to focus on a field?
body: <p>I updated from Angular 2 to Angular 4 and in the docs it's written to use the <code>Renderer2</code> instead of <code>Renderer</code> which is deprecated. </p>
  
  <p>Now am looking into the Renderer <a href="https://github.com/angular/angular/blob/master/packages/core/src/render/api.ts" rel="nofollow noreferrer">source</a>, but cannot find a way to invoke the <code>focus()</code> method as I used to.</p>
  
  <p><strong>Old method:</strong></p>
  
  <p><code>this.renderer.invokeElementMethod(element, 'focus', []);</code></p>
  
  <p>What is the new aproach?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>What if the element i am focusing onto is obtained via <code>QuerySelector</code>?</p>
  
  <p>For instance:</p>
  
  <pre><code>let inputField = document.querySelectorAll('.dialog input');
  if ( inputField[0] ) {
     inputField[0].focus();
  }
  </code></pre>
  
  <p>Since its obtained via <code>QuerySelector</code>, the <code>focus()</code> method doesn't exist on it.</p>