title: Multiple template reference variable in Angular
body: <p>In one of my component's template input element I have created two different reference variables, something like this:</p>
  
  <pre><code>&lt;input type="text" placeholder="..." #typeAhead="ngbTypeahead"
         #relationTypeInput&gt;
  </code></pre>
  
  <p><strong>P.S: This is not the exact code, but my actual code is similar to this one</strong></p>
  
  <p>In the component ts file these variable are declared as follows:</p>
  
  <pre><code>@ViewChild('typeAhead') typeAhead: NgbTypeahead;
  @ViewChild('relationTypeInput') relationTypeInput: ElementRef;
  </code></pre>
  
  <p>Then I am using the former one in ngOnInit() and the later one in ngAfterViewInit(). To my surprise I didn't got any error and it's working, but I don't understand how? </p>