Advertisement
ESlavcheva

05-06: *ngFor DIRECTIVE

Oct 19th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // LECTURE 05: Templates, Interpolation and Directives
  2. // *ngFor DIRECTIVE
  3.  
  4. // I. pm/src/app/products/product-list.component.html
  5. // 1. add tr element in the table body and specify the *ngFor directive
  6. <tr *ngFor='let product of products'>
  7.     <td></td>
  8.     <td>{{product.productName}}</td>
  9.     <td>{{product.productCode}}</td>
  10.     <td>{{product.releaseDate}}</td>
  11.     <td>{{product.price}}</td>
  12.     <td>{{product.starRating}}</td>
  13. </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement