title: Renderer2 selecting element by selectRootElement make it's content disappear
body: <p>When trying to create a tab component using Renderer2 to select a tab element, and try to add some css class to change color for example for selected tab that is currently not selected, the HTML element disappear completely from DOM:</p>
  <p>Here is the tab html template:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;detail-nav&quot;&gt;
      &lt;div class=&quot;nav-item-1&quot;&gt;
        &lt;a routerLink=&quot;main-config&quot; routerLinkActive=&quot;active&quot; (click)=actionItem1()&gt;
          &lt;span&gt;Main config&lt;/span&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class=&quot;nav-item-2&quot;&gt;
        &lt;a routerLink=&quot;sub-config&quot; routerLinkActive=&quot;active&quot; (click)=actionItem2()&gt;
          &lt;span&gt;Handling data&lt;/span&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class=&quot;nav-item-3&quot;&gt;
        &lt;a routerLink=&quot;editing&quot; routerLinkActive=&quot;active&quot; (click)=actionItem3()&gt;
          &lt;span&gt;Editing&lt;/span&gt;
        &lt;/a&gt;
      &lt;/div&gt;
  &lt;div&gt;
  </code></pre>
  <p>I've added some css to make the anchor tag have the same height as the parent div,</p>
  <p>so when using Renderer2 as:</p>
  <pre class="lang-js prettyprint-override"><code>
  ...
  
  constructor(private route: ActivatedRoute, private renderer: Renderer2) {}
  
  ...
  
  let elm = this.renderer.selectRootElement(&quot;.nav-item a&quot;);
  
  this.renderer.addClass(elm, 'nav-item');
  </code></pre>
  <p>CSS:</p>
  <pre><code>.nav-item {
    background-color: LightBlue;
  }
  </code></pre>
  <p>Then the achor tag disapears completly from the DOM when executing:</p>
  <pre class="lang-js prettyprint-override"><code>this.renderer.addClass(elm, 'nav-item');
  </code></pre>
  <p>is there any reason for this ?</p>
  <p>may be the way selectRootElement works is the issue ?</p>
  <p>any one has an idea on this ?</p>
  <p>I've already verified in devtools that elm refers to the right element in debug mode by hovering the printed elm variable.</p>