Skip to content

Commit d146234

Browse files
committed
enabled add and delete product
1 parent cc1264e commit d146234

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/products/product-add-edit.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ProductService, PubSubService } from '../_services/index';
1313

1414
export class ProductAddEditComponent implements OnInit {
1515
title = "Add Product";
16-
product: any;
16+
product: any = {};
1717

1818
constructor(
1919
private route: ActivatedRoute,

app/products/product-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<tr *ngFor="let product of products">
1010
<td><a [routerLink]="['edit', product.id]">{{product.name}}</a></td>
1111
<td>${{product.price}}</td>
12-
<td><a class="btn btn-xs btn-danger">Delete</a></td>
12+
<td><a (click)="deleteProduct(product.id)" class="btn btn-xs btn-danger">Delete</a></td>
1313
</tr>
1414
</table>
1515
<div class="view-side-form">

0 commit comments

Comments
 (0)