user3924026
user3924026

Reputation:

How to call a server side function from client in meteor

This is the function I want to call.

server/function

Meteor.methods({
  ok:function () {
    for (var i =0;i<10;i++) {
      console.log("ok");
    } 
  }
});

Edit

Using Meteor.call('ok') did not work.

The function should print ok to the server console 10 times.

Upvotes: 2

Views: 3314

Answers (1)

Perspective
Perspective

Reputation: 632

Did you try;

Meteor.call('ok');

Upvotes: 1

Related Questions