I have query param as array: ?cars=[Audi,Fiat] But ember encode it to ?cars=%5BAudi%2CFiat%5D How I can get more pretty url like ?cars=[Audi,Fiat] ? Why ember encodes reserved url characters?

1 Answer

You can override serializeQueryParam and deserializeQueryParam private methods in your route.

In these methods instead of JSON.stringify and JSON.parse, you can return the value itself and get whatever you want to parse from the string.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.