您好我刚刚升级我的流星应用0.9.1.1和我不断收到在我的控制台这2个警告
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
我没有从发生错误,或者为什么它发生的主意。
任何想法是什么我可能会丢失?
谢谢
大火API流星0.9+改变如果你正在使用
UI.insert(UI.render(Template.foo), document.body)
UI.insert(UI.renderWithData(Template.foo, {bar: "baz"}), document.body)
您需要更新UI.insert()
UI.insert(UI.renderWithData())
新的火焰API:
Blaze.render(templateOrView, parentNode, [nextNode], [parentView])
Blaze.renderWithData(templateOrView, data, parentNode, [nextNode], [parentView])
检查更新: http://docs-0.9.1.meteor.com/#blaze_render
文章来源: after upgrading to meteor 0.9.1 i keep getting “Warning: Blaze.insert has been deprecated.”