railway-pagination

0.0.1 • Public • Published

About

Siple pagination plugin for RailwayJS MVC framework.

Usage

npmfile.js

require('railway-pagination');

posts_controller.js

action(function index() { var page = req.param('page') || 1; Post.paginate({limit: 10, page: page}, function (err, posts) { if (err) render({posts: posts}); }); });

app/views/posts/index.ejs:

paginate(posts);

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i railway-pagination

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • anatoliy