Meteor中不推荐使用的UI包

时间:2014-09-08 09:17:53

标签: meteor

与meteor 0.9.1一样,他们弃用了UI.insert,UI.render和UI.renderWithData,这是渲染模板并将其放入DOM的最佳方式吗?例如,我有这样的事情:

UI.insert(UI.renderWithData(Template.comment_single, {comment: this}), $('#details')[0]);

那么我该如何更改这个已弃用的实现呢?

1 个答案:

答案 0 :(得分:0)

你现在使用Blaze:

Blaze.renderWithData(Template.comment_single,
        {comment: this},
        $('#details')[0]
)

请告诉我这是否有效,如果没有自己设定的话。迁移指南在这里: https://meteor.hackpad.com/Blaze-changes-for-0.9.1-XHBsah1DhX1