title: Setting focus of ion-textarea with Angular's ElementRef: "Property 'setFocus' does not exist on type 'ElementRef'."
body: <p>I have created a textarea component that focuses itself when it's created in the ngAfterViewInit() method:</p>
  
  <pre><code>ngAfterViewInit() {
      if(this.text.length===0){
      this.theinput.setFocus();
      }
    }
  </code></pre>
  
  <p>It works perfectly fine, the behavior matches exactly what I expected.</p>
  
  <p>I'm using ElementRef to get the ion-textarea component:</p>
  
  <pre><code>@ViewChild('name') theinput: ElementRef;
  
  
  &lt;ion-textarea #name rows="1" &gt;&lt;/ion-textarea&gt;
  </code></pre>
  
  <p>However when running <code>ionic serve</code> and building the app, it doesn't build and shows an error:</p>
  
  <pre><code>"Property 'setFocus' does not exist on type 'ElementRef'."
  </code></pre>
  
  <p>at the <code>this.theinput.setFocus()</code> line of code.</p>
  
  <p>If I comment out this line of code, build the app, and then uncomment - everything works as expected. However that is not a good solution.</p>
  
  <p>Is there a better workaround for an issue like this? Extending ElementRef or something of that sort?</p>