vue_resource_interceptor.js.es6 233 Bytes
Newer Older
1
Vue.http.interceptors.push((request, next)  => {
Phil Hughes's avatar
Phil Hughes committed
2
  Vue.activeResources = Vue.activeResources ? Vue.activeResources + 1 : 1;
3

4 5 6 7 8
  Vue.nextTick(() => {
    setTimeout(() => {
      Vue.activeResources--;
    }, 500);
  });
Phil Hughes's avatar
Phil Hughes committed
9
  next();
10
});