Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a routerLink="/admin/products/new" class="btn btn-primary my-3">New product</a>
- <div class="form-inline my-2 my-lg-0">
- <input #query (keyup)="filterProducts(query.value)" class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
- </div>
- <table mat-table [dataSource]="filteredProducts">
- <ng-container matColumnDef="title">
- <th mat-header-cell *matHeaderCellDef class="mat-column-right">Title</th>
- <td mat-cell *matCellDef="let element" class="mat-column-right">{{ element.title }}</td>
- </ng-container>
- <ng-container matColumnDef="responsible">
- <th mat-header-cell *matHeaderCellDef class="mat-column-right">Category</th>
- <td mat-cell *matCellDef="let element" class="mat-column-right">{{ element.category }}</td>
- </ng-container>
- <ng-container matColumnDef="severity">
- <th mat-header-cell *matHeaderCellDef class="mat-column-right">Price</th>
- <td mat-cell *matCellDef="let element" class="mat-column-right">{{ element.price }}</td>
- </ng-container>
- <ng-container matColumnDef="actions">
- <th mat-header-cell *matHeaderCellDef class="mat-column-right">Actions</th>
- <td mat-cell *matCellDef="let element" class="mat-column-right">
- <button class="btn btn-link btn-info" (click)="editProduct(element._id)">Edit</button>
- <button class="btn btn-link btn-danger" (click)="deleteProduct(element._id)">Delete</button>
- </td>
- </ng-container>
- <tr mat-header-row *matHeaderRowDef="displayedTableColumns"></tr>
- <tr mat-row *matRowDef="let row; columns: displayedTableColumns"></tr>
- </table>
- <!--<table class="table table-striped my-3">-->
- <!--<thead>-->
- <!--<tr>-->
- <!--<th>Title</th> <th>Category</th> <th>Price</th>-->
- <!--</tr>-->
- <!--</thead>-->
- <!--<tbody>-->
- <!--<tr *ngFor="let product of filteredProducts">-->
- <!--<td>{{ product.title }}</td>-->
- <!--<td>{{ product.category }}</td>-->
- <!--<td>{{ product.price | currency: 'USD': 'symbol-narrow' }}</td>-->
- <!--<td><a (click)="editProduct(product._id)" class="btn btn-link btn-info">Edit</a></td>-->
- <!--<td><a (click)="deleteProduct(product._id)" class="btn btn-link btn-danger">Delete</a></td>-->
- <!--</tr>-->
- <!--</tbody>-->
- <!--</table>-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement