使用 ReactiveVar

服务器端

Meteor.methods({
  getData() {
    return 'Hello, world!';
  }
});

客户端

<template name="someData">
  {{#if someData}}
    <p>{{someData}}</p>
  {{else}}
    <p>Loading...</p>
  {{/if}}
</template>
Template.someData.onCreated(function() {

  this.someData = new ReactiveVar();

  Meteor.call('getData', (err, res) => {
    this.someData.set(res);
  });
});

Template.someData.helpers({
  someData: function() {
    return Template.instance().someData.get();
  }
});

需要 reactive-var 包。要添加它,请运行 meteor add reactive-var