angular 2 ViewChild doesnt work
<p>I can't understand why <code>ViewChild</code> is returning null when the same exact code works on a <code>textarea</code> element, but it won't work on <code>div</code></p>

<p>Template:</p>

<pre><code>&lt;div #refId class = 'line_counter' &gt;
    {{lineNumber}}
&lt;/div&gt;
</code></pre>

<p>Component:</p>

<pre><code>import {Component, OnInit, Input, ElementRef, ViewChild} from '@angular/core';
import {Globals} from "../../../globals";

@Component({
  selector: 'app-line-counter',
  templateUrl: './line-counter.component.html',
  styleUrls: ['./line-counter.component.css']
})
export class LineCounterComponent implements OnInit {

  @ViewChild('#refId') textDiv:ElementRef;

  @Input() lineNumber : number = 0;

  constructor() {
  }

  ngOnInit() {
    if(Globals.refLineCounter == null) {
      Globals.refLineCounter = this;
      //console.log(Globals.refLineCounter.getHeight());
      console.log(this.getHeight());
    }
  }

  getHeight(){
    return this.textDiv.nativeElement.height;
  }
}
</code></pre>