Sysrq147
Sysrq147

Reputation: 1367

MeteorJS and alethes:pages

I am trying to build simple MeteorJS application that uses iron-route and alethes:pages package for pagination.

I am defining my route:

lib/routes.js

Router.route('/test' {
});

lib/collections/testCollection.js

Test = new Mongo.Collection("test");

server/publications.js

Pages = new Meteor.Pagination(Test);

In my template:

client/test.html

<template name="test">

{{> pages}}

</template>

Nothing is showing ? Can someone help me see the problem? (Database is populated: _id "field" and test "field" in document structure.)

Upvotes: 1

Views: 560

Answers (2)

Athman
Athman

Reputation: 594

I had the same problem, then tried to change the names such that my template name matched the collection name and it works fine

Upvotes: 1

mstamos
mstamos

Reputation: 111

The

Pages = new Meteor.Pagination(Test);

it can't be on a server side code only. It has to be in a common code, running on both the server and the client

Upvotes: 0

Related Questions