How do I set a query param to an array?
I have the following setup:
export default Ember.Controller.extend({
queryParams: ['sort'],
sort: null,
actions: {
onSortChanged(sort) {
console.log('Sorting By: ', sort); // sort = ['name:asc']
this.set('sort', sort);
}
}
});
But it renders as ?sort=name%3Aasc
whereby I need it to render as ?sort[]=name%3Aasc
Aucun commentaire:
Enregistrer un commentaire