I have a route in #/posts for posts that show the first page of posts, and a pagination route in #/posts/:page_id that shows any page you request. My router looks like this:
App.Router.map(function(match) { //... this.route('posts'); this.resource('postsPage', { path: '/posts/:page_id' }); });
And these routes look like this:
App.PostsRoute = Em.Route.extend({ model: function(params) { return App.store.find(App.Post, { 'page': params.page_id }); } }); App.PostsPageRoute = Em.Route.extend({ renderTemplate: function() { this.render('posts'); }, model: function(params) { return App.store.find(App.Post, { 'page': params.page_id }); } });
This worked fine about a month after I implemented it, but recently it has stopped working for anything other than the #/posts route. Pages do not load, although my REST API returns the right JSON.
Feed here
#/posts route here
#/posts/1 route here (note that it doesn't load content even if JSON is sent)
source share