Meteor 1.3填充从集合中选择

时间:2022-04-22 16:24:10

I'm trying to just populate a select from the db. The select works with fix options but not with data from the collection.

我正在尝试从db中填充一个select。选择适用于修复选项,但不适用于集合中的数据。

For now, I have not removed autopublish package yet as I'm learning.

目前,我还没有删除autopublish包,因为我正在学习。

It looks like the collection is not visible. If I type CarBrands.find() in the browser's console (Chrome) it says: "Uncaught ReferenceError: CarBrands is not defined".

看起来该集合不可见。如果我在浏览器的控制台(Chrome)中键入CarBrands.find(),它会说:“未捕获的ReferenceError:未定义CarBrands”。

I consider I have not to publish and subscribe anything at this point.

我认为此时我还没有发布和订阅任何内容。

I am following the todos tutorial but with my own idea instead of the todo list. Also, I am using meteor 1.3 (with the imports and all that stuff, as the tutorial shows)

我正在按照todos教程,但我自己的想法,而不是待办事项清单。此外,我正在使用流星1.3(使用导入和所有东西,如教程所示)

Any help is more than welcome. I've posted this same question in the meteor's forum and there you can see the code as well.

任何帮助都非常受欢迎。我在流星论坛上发布了同样的问题,你也可以在那里看到代码。

Thanks in advance.

提前致谢。

1 个解决方案

#1


0  

As I am using selectize.js I searched for the issue and I found a kind of answer in here. Yet I am not 100% happy but at least its behaviour is better than before

当我使用selectize.js时,我搜索了这个问题,我在这里找到了一种答案。然而,我并不是百分之百的幸福,但至少它的行为比以前更好

#1


0  

As I am using selectize.js I searched for the issue and I found a kind of answer in here. Yet I am not 100% happy but at least its behaviour is better than before

当我使用selectize.js时,我搜索了这个问题,我在这里找到了一种答案。然而,我并不是百分之百的幸福,但至少它的行为比以前更好