Created
August 26, 2012 22:34
-
-
Save carlosrodriguez/3483962 to your computer and use it in GitHub Desktop.
Meteor Method Call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Server | |
Meteor.methods({ | |
foo: function() { | |
return 1; | |
}, | |
bar: function(arg) { | |
return "test"; | |
} | |
}); | |
// Client | |
var sel = {id: 1}; | |
Meteor.call('bar', sel, function(error, result) { | |
console.log(error); | |
return console.log(result); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment