Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Template.myTemplate.events({
- 'submit #myForm': function(event) {
- event.preventDefault();
- Meteor.call('myMethod', function(error, response) {
- //
- });
- },
- });
- Meteor.methods({
- myMethod: function() {
- try {
- return (Collection.insert({
- data: 'Hello world'
- })) ? true : false;
- } catch(e) {
- throw new Meteor.Error(e);
- }
- }
- });
Add Comment
Please, Sign In to add comment