feed helper from a callback

前端 未结 1 1078
隐瞒了意图╮
隐瞒了意图╮ 2021-01-27 11:47

I am trying to implement a file browser in Meteor. Users can go through some network folders and add them to the collection for further processing.

This is my simple tem

相关标签:
1条回答
  • 2021-01-27 12:16

    I am not sure it is a good idea using a Meteor method in a template helper.

    A simple solution would be to use an intermediate ReactiveVar. When your template is created, make your method call, and update the ReactiveVar in the callback. Then in your folder helper, simply return the ReactiveVar content.

    Meteor will update reactively when your method asynchronously returns.

    0 讨论(0)
提交回复
热议问题