升级到流星0.9.1之后,我继续收到“警告:Blaze.insert已被弃用". [英] after upgrading to meteor 0.9.1 i keep getting "Warning: Blaze.insert has been deprecated."

查看:84
本文介绍了升级到流星0.9.1之后,我继续收到“警告:Blaze.insert已被弃用".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将流星应用程序升级到0.9.1.1,并且在控制台中不断收到这2条警告消息

Hi I just upgraded my meteor app to 0.9.1.1 and I keep getting these 2 warnings in my console

W20140910-18:37:07.781(3) (blaze.js:67) Warning: Blaze.render without a parent element is deprecated. You must specify where to insert the rendered content. logging.js:65
W20140910-18:37:07.787(3) (blaze.js:67) Warning: Blaze.insert has been deprecated.  Specify where to insert the rendered content in the call to Blaze.render. logging.js:65

我不知道错误发生的位置或原因.

I have no idea from where the error occurs, or why it happens.

我可能会想念的任何东西吗?

Any idea of what I might be missing ?

谢谢

推荐答案

大火API在流星0.9+中已更改 如果您使用的是

The blaze API changed in meteor 0.9+ If you are using

 UI.insert(UI.render(Template.foo), document.body)
 UI.insert(UI.renderWithData(Template.foo, {bar: "baz"}), document.body)

您需要更新UI.insert() & UI.insert(UI.renderWithData())

使用新的Blaze API:

to the new Blaze API:

Blaze.render(templateOrView, parentNode, [nextNode], [parentView])
Blaze.renderWithData(templateOrView, data, parentNode, [nextNode], [parentView])

检查更新: http://docs-0.9.1.meteor.com/#blaze_render

这篇关于升级到流星0.9.1之后,我继续收到“警告:Blaze.insert已被弃用".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆