我正沿着例如書籍「Packtpub.Getting.Started.with.Meteor.js」借閱圖書館的應用程序如下。如何在用戶註銷後刪除數據?
http://matloob.lendlib.meteor.com
它工作正常,但是當用戶註銷時,一類是開放的,正在顯示它的項目,該類別及其項目保留在網頁上,而其餘部分被過濾:它是在運行出。在刷新頁面時,剩餘的類別也被過濾掉。
的發佈功能是:
Meteor.publish("Categories", function() {
Meteor.flush(); // I added this so it will flush out the remaining data, but :(
return lists.find({owner: this.userId}, {fields: {Category: 1}});
});