diff options
author | Alex Tatiyants <atatiyan@gmail.com> | 2016-01-29 21:05:29 -0800 |
---|---|---|
committer | Alex Tatiyants <atatiyan@gmail.com> | 2016-01-29 21:33:22 -0800 |
commit | d256691ac0e4d2e1cd41ef1c1d9ce3c310e77dc6 (patch) | |
tree | ec74c3da7ec9ac3fad752147af1756bbcbdd3e30 /app/components/plan-list/plan-list.ts | |
parent | 267ebad5c09c88b0b1612669afd8b9928e91200c (diff) |
fix #12
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(); } |