title: How to get the value of the innerHTML of a viewChild in Angular?
body: <p>I need the value of a viewChild in Angular in order to check if it is an empty string or not.</p>
  <p>My ViewChild looks like this:</p>
  <pre><code>@ViewChild('myItem', { static: true }) myItem: ElementRef;
  </code></pre>
  <p>I get the value like this:</p>
  <pre><code>console.log('itemType', this.myItem.nativeElement.firstChild); // returns &quot;TESTSTRING&quot;
  </code></pre>
  <p>In the console the value looks like this: &quot;TESTSTRING&quot; which is a string, but if I check with typeof it says that it is an object:</p>
  <pre><code>console.log('itemType', typeof this.myItem.nativeElement.firstChild); // returns object
  </code></pre>
  <p>I'd like to check it like this:</p>
  <pre><code>this.myItemIsEmpty = this.myItem.nativeElement.firstChild === ''; // returns always false
  </code></pre>
  <p>What am I doing wrong here?</p>