Last active
August 29, 2015 14:20
-
-
Save brandonhilkert/f845ee9c1779bdf2332f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
queryParams: ['filter', 'sort'], | |
filter: {}, | |
sort: '-id' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; | |
export default Ember.Route.extend(AuthenticatedRouteMixin, { | |
queryParams: { | |
filter: { refreshModel: true }, | |
sort: { refreshModel: true } | |
}, | |
model: function(params) { | |
return this.store.find('account', params); | |
}, | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When the query param is an object ('filter') it doesn't seem to trigger changes to the model. It worked before I involved the filter object and the controller attribute was just "id". Is there something about an object that it won't observe? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment