title: populating a table with angular2 *ngFor?
body: <p>I'm trying to populate a bootstrap styled table with information retrieved from a get request.</p>
  
  <p>I am getting the information just fine, but it is not being output in the desired way. </p>
  
  <p>Here is my code;</p>
  
  <p><strong>view component</strong></p>
  
  <pre><code>&lt;div class="col-md-12"&gt;
      &lt;table class="table table-striped"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Name&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;view-employee-list [employee]="employee" *ngFor="let employee of employees" &gt;&lt;/view-employee-list&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>view-employee-list component</strong></p>
  
  <pre><code>&lt;tr&gt;
       &lt;td&gt;{{employee.name}}&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>However it does not output the desired result, here is an image of the dom tree;</p>
  
  <p><a href="https://i.stack.imgur.com/MjS0a.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MjS0a.png" alt="dom"></a></p>
  
  <p>and for ref the kind of table I'm trying to duplicate;</p>
  
  <p><a href="http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_table_striped&amp;stacked=h" rel="noreferrer">w3schools bootstrap table</a></p>
  
  <p>I thought that the template syntax would be ignored and the dom would interpret what was contained within the template container to be at the 'root' level, however this is not the case.</p>
  
  <p>I'm not sure how to remedy the problem, and was hoping someone could offer some advice?</p>