diff options
Diffstat (limited to 'app/components/plan-list/plan-list.ts')
-rw-r--r-- | app/components/plan-list/plan-list.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/components/plan-list/plan-list.ts b/app/components/plan-list/plan-list.ts index 888e2e2..32583a3 100644 --- a/app/components/plan-list/plan-list.ts +++ b/app/components/plan-list/plan-list.ts @@ -20,6 +20,7 @@ export class PlanList { newPlanContent: any; newPlanId: string; openDialog: boolean = false; + planToDelete: IPlan; constructor(private _planService: PlanService) { } @@ -27,13 +28,15 @@ export class PlanList { this.plans = this._planService.getPlans(); } - requestDelete() { + requestDelete(plan) { this.openDialog = true; + this.planToDelete = plan; } deletePlan(plan) { this.openDialog = false; - this._planService.deletePlan(plan); + console.log(this.planToDelete); + this._planService.deletePlan(this.planToDelete); this.plans = this._planService.getPlans(); } |