Skip to content

Commit

Permalink
Step 15.6: Add the click handler in the Component
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha committed Nov 27, 2016
1 parent 626f6dd commit 3d64e88
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 @@ -73,6 +73,14 @@ export class PartyDetailsComponent implements OnInit, OnDestroy {
});
}

invite(user: Meteor.User) {
MeteorObservable.call('invite', this.party._id, user._id).subscribe(() => {
alert('User successfully invited.');
}, (error) => {
alert(`Failed to invite due to ${error}`);
});
}

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

0 comments on commit 3d64e88

Please sign in to comment.