当Collection在客户端上完成加载时,我需要执行特定的渲染任务.什么是了解客户端上的数据何时可用的最佳策略.
我想出了这个解决方案:
Meteor.subscribe( 'alldrawings', myRendering );
function myRendering(){
//do some no-markup stuff with the data
//(i'm creating canvas objs and drawing on them)
}
Run Code Online (Sandbox Code Playgroud)
这是这样做的吗?除此之外是否有推荐的方法?