我试图使用Meteor和Famo.us在Grid中显示一些表面而没有任何成功。在本地运行项目后,浏览器显示一个空白屏幕。作为参考,我正在看这个例子:https://famous-views.meteor.com/views/GridLayout
HTML
<template name="gridTemplate">
{{#GridLayout size='[undefined,undefined]' dimension='[3,3]'}}
{{#famousEach items}}
{{>ContainerSurface template='gridItem' }}
{{/famousEach}}
{{/GridLayout}}
</template>
<template name="gridItem">
{{#Surface size='[undefined,undefined]'}}
<img src="/img/thumbnail.png">
{{/Surface}}
</template>
的Javascript
FView.ready(function(require) {
FView.registerView('GridLayout', famous.views.GridLayout);
});
var items = [{
name:"adfadf"
},
{
name:"adfadf"
},
{
name:"adfadf"
},
{
name:"adfadf"
}];
Template.gridTemplate.helpers({
items:function()
{
return items;
}
});
答案 0 :(得分:1)
我遇到了同样的错误,现在发现不幸的是,流星的当前着名观点已被弃用,而新版本与新发布的famo.us 0.5一起使用。和表面不再有效。
您可以访问https://github.com/gadicc/meteor-famous-views了解更多信息,但现在很难对当前的着名观点提供帮助,因为所有讨论基本上都是针对新版本。
让我知道你提出了什么,到目前为止我自己进行了测试。