How to create a dynamic table in angular2?

You can use built-in directive *ngFor in angular2.0.

 <table>
    <tr *ngFor="let x of names">
          <td>{{ x.Name }}</td>
          <td>{{ x.Country }}</td>
    </tr>
</table>

Leave a Comment