Advertisement
Shell_Casing

template

Nov 19th, 2018
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.28 KB | None | 0 0
  1. <a routerLink="/admin/products/new" class="btn btn-primary my-3">New product</a>
  2.  
  3. <div class="form-inline my-2 my-lg-0">
  4.   <input #query (keyup)="filterProducts(query.value)" class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
  5. </div>
  6.  
  7.  
  8.  
  9. <table mat-table [dataSource]="filteredProducts">
  10.  
  11.     <ng-container matColumnDef="title">
  12.       <th mat-header-cell *matHeaderCellDef class="mat-column-right">Title</th>
  13.       <td mat-cell *matCellDef="let element" class="mat-column-right">{{ element.title }}</td>
  14.     </ng-container>
  15.  
  16.     <ng-container matColumnDef="responsible">
  17.       <th mat-header-cell *matHeaderCellDef class="mat-column-right">Category</th>
  18.       <td mat-cell *matCellDef="let element" class="mat-column-right">{{ element.category }}</td>
  19.     </ng-container>
  20.  
  21.     <ng-container matColumnDef="severity">
  22.       <th mat-header-cell *matHeaderCellDef class="mat-column-right">Price</th>
  23.       <td mat-cell *matCellDef="let element" class="mat-column-right">{{ element.price }}</td>
  24.     </ng-container>
  25.  
  26.     <ng-container matColumnDef="actions">
  27.       <th mat-header-cell *matHeaderCellDef class="mat-column-right">Actions</th>
  28.       <td mat-cell *matCellDef="let element" class="mat-column-right">
  29.         <button class="btn btn-link btn-info" (click)="editProduct(element._id)">Edit</button>
  30.         <button class="btn btn-link btn-danger" (click)="deleteProduct(element._id)">Delete</button>
  31.       </td>
  32.     </ng-container>
  33.  
  34.     <tr mat-header-row *matHeaderRowDef="displayedTableColumns"></tr>
  35.     <tr mat-row *matRowDef="let row; columns: displayedTableColumns"></tr>
  36.  
  37. </table>
  38.  
  39.  
  40. <!--<table class="table table-striped my-3">-->
  41.   <!--<thead>-->
  42.   <!--<tr>-->
  43.     <!--<th>Title</th> <th>Category</th> <th>Price</th>-->
  44.   <!--</tr>-->
  45.   <!--</thead>-->
  46.   <!--<tbody>-->
  47.   <!--<tr *ngFor="let product of filteredProducts">-->
  48.     <!--<td>{{ product.title }}</td>-->
  49.     <!--<td>{{ product.category }}</td>-->
  50.     <!--<td>{{ product.price | currency: 'USD': 'symbol-narrow' }}</td>-->
  51.     <!--<td><a (click)="editProduct(product._id)" class="btn btn-link btn-info">Edit</a></td>-->
  52.     <!--<td><a (click)="deleteProduct(product._id)" class="btn btn-link btn-danger">Delete</a></td>-->
  53.   <!--</tr>-->
  54.   <!--</tbody>-->
  55. <!--</table>-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement