Skip to content

Commit

Permalink
Step 15.13: Add reply method to PartyDetails component
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and DAB0mB committed Dec 14, 2016
1 parent 06b8e8b commit 2280cb4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/imports/app/parties/party-details.component.ts
Expand Up @@ -91,6 +91,14 @@ export class PartyDetailsComponent implements OnInit, OnDestroy {
});
}

reply(rsvp: string) {
MeteorObservable.call('reply', this.party._id, rsvp).subscribe(() => {
alert('You successfully replied.');
}, (error) => {
alert(`Failed to reply due to ${error}`);
});
}

ngOnDestroy() {
this.paramsSub.unsubscribe();
this.partySub.unsubscribe();
Expand Down

0 comments on commit 2280cb4

Please sign in to comment.