We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use $route.query in vue-resource like this:
Vue.http.get('/someUrl', {query: $route.query});
and receive a obj.hasOwnProperty is not a function error;
obj.hasOwnProperty is not a function
I find in vue-route create query by using Object.create(null) and this is completely blank object, no inherit hasOwnProperty method.
Object.create(null)
however in vue-resource, it can use obj.hasOwnProperty in each function to transform the params query.
obj.hasOwnProperty
each
The text was updated successfully, but these errors were encountered:
As a workaround until this is fixed, you can use the assign syntax: query: {...$route.query}
query: {...$route.query}
Sorry, something went wrong.
01889c0
http://example.com?a=1&b=2&c=3
I want to change one of the param value and still use it like
query: { ...$route.query }
any ideas?
you just do
query: { ...$route.query, myOverridenValue: 'hi' }
Remember you can use the forum or the Discord server to ask quick questions 🙂
OK , thank you . I just start learning Vue ,so I didn't know those websites before you told me . 👀
It's nothing related to Vue, it is just js (or es?).
js
es
No branches or pull requests
I use $route.query in vue-resource like this:
and receive a
obj.hasOwnProperty is not a function
error;I find in vue-route create query by using
Object.create(null)
and this is completely blank object, no inherit hasOwnProperty method.however in vue-resource, it can use
obj.hasOwnProperty
ineach
function to transform the params query.The text was updated successfully, but these errors were encountered: