Permalink
Browse files

Step 15.13: Add reply method to PartyDetails component

  • Loading branch information...
1 parent 06b8e8b commit 2280cb40b79d1d8458bfa4ddd793fdc4c0d72785 @dotansimha dotansimha committed with DAB0mB Sep 27, 2016
Showing with 8 additions and 0 deletions.
  1. +8 −0 client/imports/app/parties/party-details.component.ts
@@ -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();

0 comments on commit 2280cb4

Please sign in to comment.