For searching hotels, my initial routes look like
App.Router.map ->
this.resource('hotels',
path: '/hotels/:city/:country/:checkin/:checkout/', ->
this.resource('hotels.sort',
path: '/sort/:method'
)
)
In the child route;
App.HotelsSortRoute = Ember.Route.extend
model: (params) ->
console.log(params);
only returns {sort: price}
The excellent resource at Ember deeply nested routes do not keep parent dynamic parameter hints that using this.modelFor
will return the parent model.
However, the query that is fired to the backend (sorting hotels in a different way) will also return different results (since it has a pagination of about 20 hotels).
How do I go about firing a new request to the server for sorting, without reloading the entire page?