在Meteor服务器中的meteor.call方法之间共享变量

时间:2014-12-20 09:45:41

标签: javascript meteor

假设我在

中声明了2个方法
Meteor.methods({
   firstFunction: function(){
       //makes a http post
       //that returns a value
       //I then get that value and store it in var x
       var x = //value returned from http post
   },

   secondFunction: function(){
       //how do I access the var x?  
   }

});

在第一个函数中,我将一个http帖子发送到一个返回值的网站。 然后我可以接收该值并将其存储在变量中。 如何使该变量可供其他功能访问,例如secondFunction ???

非常感谢您的帮助......

0 个答案:

没有答案
相关问题