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>
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>
If you want to add each item in options to opt, then: let opt = []; let options = [ { name: “option1”, value: 1 }, { name: “option2”, value: 2 } ] options.forEach(x => opt.push(x));
This indicates there is a network problem while installing npm dependencies. Please try doing it again on a stable connection.