javascript - possible to do params in backbone routes -
i looking @ routes in backbone , wondering if can following:
routes: { '': 'posts', 'posts?page=:page': 'posts' }
this allow me plain index of posts , add pagination index of posts.
is ok or there better way this?
is using query parameter requirement? if not, can use router's param functionality:
routes: { '': 'posts', "page/:page": "posts" // #page/n }
Comments
Post a Comment