Answer the question
In order to leave comments, you need to log in
How to work with history.replaceState + axios + vue?
I'm trying to link axios and url for filtering without reloading the page, but with parameters in the url. They suggested doing this using history.replaceState.
I did
fetch() {
history.replaceState({type_id: this.filter.type_id}, "type_id", url);
axios.get(url, {
params: {
type_id: this.filter.type_id,
}
})
}
Answer the question
In order to leave comments, you need to log in
Made a request type check on the back
if ($request->ajax()) {
return json;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question