2
meteor-publish-composite
を試してみると問題があります。私は、このページhttps://github.com/englue/meteor-publish-compositeを見て、私は私の流星プロジェクトに次のコードを実行します。私はこのような公開-複合関数を作成流星合成複合体はありません
meteor add reywood:publish-composite
:
import { Meteor } from 'meteor/meteor';
import { Categories } from '../../../../both/collections/administration/category.collection';
import { Structures } from '../../../../both/collections/administration/structure.collection';
//Meteor.publish('categories',() => Categories.find());
Meteor.publishComposite('categoriesWithStructures', {
find:() => {
return Categories.collection.find();
},
children: [{
find:(category) => {
console.log(category);
return Structures.collection.find({_id: category.structure});
}
}]
});
しかし、私は、コンソールIで、プロジェクトを初期化するときメッセージが表示さ:流星モジュールが追加され.meteor/packages
ファイルで
Property 'publishComposite' does not exist on type 'typeof Meteor'
を
angular2-compilers
accounts-password
msavin:mongol
reywood:publish-composite
私の流星プロジェクトの使用Angular2
。
私は何か助けていただきありがとうございます。よろしく。
このコードはサーバーで実行されていますか? '.publishComposite()'はクライアントで利用できません。 –
はい、サーバー上で実行されています –