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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -