-
-
Save mikerpost/8172794 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if (Meteor.is_client) { | |
Template.hello.greeting = function () { | |
return "Welcome to XYZ."; | |
}; | |
Template.hello.events = { | |
'click input' : function () { | |
// template data, if any, is available in 'this' | |
if (typeof console !== 'undefined') | |
console.log("You pressed the button"); | |
console.log(Meteor.call('test', 1, function(e, r) { | |
console.log('e', e); | |
console.log('r', r); | |
})); | |
} | |
}; | |
} | |
if (Meteor.is_server) { | |
Meteor.startup(function () { | |
// code to run on server at startup | |
Meteor.methods({ | |
test: function(arg) { | |
console.log('test'+arg); | |
return 'test'+arg; | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment