Permalink
Browse files

Step 15.6: Add the click handler in the Component

  • Loading branch information...
1 parent 4ec8dac commit f894f7d9aad49bb4ca9a4cee658e05dec517ca6c @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
@@ -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();

0 comments on commit f894f7d

Please sign in to comment.