Wednesday 15 September 2010

javascript - How can I use Meteor simple schema with meteor-pages -


Just started playing with the meteor and I meteor-simple-schema meteor -Page

The principle is simple to work with, I'm just playing with the example todos which they provide and want to add Infinity Scroll to more todos But I can not get to work both for loading. My Code is here for Meteor-simple-schema

  Todos = new Meteor.collection ('todos', {}); Schema = {}; (Type: date, label: "created", optional: incorrect}, initiator: (new) simple header (new text (type: string, label: "name", max: 200, minute: 2}, created: { Type: boolean, default value: incorrect, label: "done?", Optional: true}}));   

Then I have changed the new meteor call ('todos') to new meteor page ('todos') and even New meteor. Endorsement ('todos ')

But then schema causes errors, how can I do both?

Here are the errors:

  W20150317 -22: 47: 23.197 (1)? (STDERR) ~ / .meteor / package / meteor-tool / .1.0.41.azxhr5 ++ os.osx.x86_64 + web.browser + web.cordova / meteor-tool- Os.osx.x86_64 / dev_bundle / server-Lib / node_modules / fibers / future.js: 173 W20150317-22: 47: 23.197 (1)? (STDERR) Throw (East); W20150317-22: 47: 23.197 (1) ? (STDERR) ^ W20150317-22: 47: 23.199 (1)? (STDERR) type error: object # & lt; Page & gt; Is there no way 'attachSchema' W20150317-22: 47: 23.200 (1)? (STDERR) app / collection / Tudos JS: 25: 7 W.20150317-22: 47: 23.200 (1)? (STDERR) App / Archive / Tudos.JS: 60: 3  

So this is very The old question is, but maybe someone is looking for answers.

To use paging of meteorite pages with collection 2, you just have to pass the archive object for the matcher. Endorsement

> Example:

var Customer = New Mongo Collection ("Customer"); Var schema = {}; Schema Customer = new simple semen ({...}); Customers.attachSchema (Schemas.Customer); Var pages = new meteorite Illustration (customer, {...});

No comments:

Post a Comment