Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Templates 流星模板名称上的点_Templates_Meteor_Meteor Blaze_Spacebars - Fatal编程技术网

Templates 流星模板名称上的点

Templates 流星模板名称上的点,templates,meteor,meteor-blaze,spacebars,Templates,Meteor,Meteor Blaze,Spacebars,所以,我一直在尝试使用Meteor的空格键语法创建一个名为“Chart.Line”的模板。因此,如果我这样做: <template name="Chart"> // random stuff here </template> //这里是随机的东西 然后使用{{>Chart}}将其导入到我想要的任何地方,然后所有随机内容都会按预期运行。但如果我这样定义模板: <template name="Chart.List"> // random stuf

所以,我一直在尝试使用Meteor的空格键语法创建一个名为“Chart.Line”的模板。因此,如果我这样做:

<template name="Chart">
   // random stuff here
</template>

//这里是随机的东西
然后使用{{>Chart}}将其导入到我想要的任何地方,然后所有随机内容都会按预期运行。但如果我这样定义模板:

<template name="Chart.List">
   // random stuff here
</template>

//这里是随机的东西
那么,什么都不管用

我的问题是:这里怎么了?我一直在看文档和源代码,但我不知道在这种特殊情况下使用dots有什么错


附言:是的,将其称为“图表列表”而不是“图表列表”或类似的名称是非常可取的。

您可以在模板名称中使用点


Blaze将尝试访问
Chart
List
属性,而不是名为
Chart.List
的模板(如注释中所述)。

这可能会失败,因为只要有一点javascript想要引用该模板,javascript将
.list
解释为
图表
对象的属性。我怀疑Blaze中有这样的地方。我用Chrome的调试工具进行了一些挖掘,发现正在创建一个Spacebar.dot对象。我不知道是否和你说的有关。不管怎样,谢谢你的帮助。(编辑以进行格式化和清理)