D
D
Daniil Chashkov2018-07-25 16:05:46
Vue.js
Daniil Chashkov, 2018-07-25 16:05:46

How to disable pjax while an ajax request is being made?

Implemented page navigation using pjax, but ran into a problem. The request is made on the main page

axios.get('/getcategories').then((response) => {
  this.categories = response.data;
});

And as a result it gives an error 500
How to disable pjax for the duration of the ajax request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-07-25
@webinar

Implemented page navigation using pjax

why?
and why did you decide that it interferes? As I understand it, the problem is not in pjax itself, but in the fact that you launch it with any sneeze on the site.
it is not at all obvious that the error is somehow related to pjax
, pjax has a bunch of events, for example pjax:beforeSend, so you can delay whatever you want there without any problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question