Open Alino opened 9 years ago
first bulletpoint in this part of the README is the thing I struggle with here:
router (String, default = undefined) - Three options:
- true - a router is used but the routes are configured separately by the user
- false - no router used
- "iron-router" - iron-router is used and the routes are automatically set up by Pages
So I got on my client code
Template.myItemTemplate.onCreated(function() {
return Pages.set({
router: true
});
});
but chrome console gives me then this error:
Exception from Tracker recompute function: Error: Match error: Failed Match.OneOf or Match.Optional validation
What else should I do? Something with flow router I guess but what :D My goal is to have routing for pages like .../page/1 .../page/2 and so on.
I'm in the similar situation. Are you using this package successfully with Flow Router?
You can not add the router option and standard pagination should be OK. I had a hard time getting it to work with infinite scroll though.
+1 for a Flow Router (ideally + React.js) example...
@sungwoncho unfortunately I am not successful in using this with flow router yet. Example is needed.
@Alino Yeah an example would be nice. I ended up implementing my own pagination because my case was simple. I only needed 'prev' and 'next' button not the page numbers.
+1
+1
+1
+1
Any work around? Please share.
Any news?
+1, flow router is now the official router used in the Meteor guide.
+1
+100
+1
+1
+1
In the mean while, this minimal package got me going: https://github.com/miguelalarcos/flow-router-pagination. The key is to use tmeasday:publish-counts package for real time counting the documents (used by the flow-router-pagination
package).
++1
+1
+1
Please, could someone provide an example how to use basic pagination with flow router? Or any other router than iron-router? From the README I cannot understand how to configure it manually by myself when I set options for pages to router: true on client side.