title: Angular2 Set focus
body: <p>I am trying to return focus to the <code>&lt;button&gt;</code> which called a custom alert using <code>ViewChid</code>.</p>
  
  <p>In my component I have:</p>
  
  <pre><code>  @ViewChild('refocus') reFocus: any;
  
    removeCancel() {
       this.reFocus.nativeElement.focus();
    }
  </code></pre>
  
  <p>In my template I added <code>#refocus</code> to:</p>
  
  <pre><code>&lt;button #refocus class="fbtn2" href="javascript:void(0)" (click)="removeDriver(index)"&gt;REMOVE&lt;/button&gt;
  &lt;cp-confirmAlert (confirmCancel)="removeCancel()" (confirmAction)="removeConfirm()"&gt;&lt;/cp-confirmAlert&gt;
  </code></pre>
  
  <p>My problem is, there can be multiple REMOVE buttons on the page. I have the <code>index</code> when clicked but no mater what I try,  the focus gets set to the first one rather than index #2..  Anyone have an idea what I am missing?</p>