This commit is contained in:
@@ -12,6 +12,29 @@ Vue.config.productionTip = false;
|
||||
Vue.config.errorHandler = errorHandler.handleVueError;
|
||||
window.onerror = errorHandler.handleGeneralError;
|
||||
|
||||
//Loading indicator
|
||||
|
||||
router.beforeResolve((to, from, next) => {
|
||||
// If this isn't an initial page load.
|
||||
from;
|
||||
if (to.name) {
|
||||
// Start the route progress bar.
|
||||
//NProgress.start()
|
||||
// eslint-disable-next-line
|
||||
console.log("---===LOADING===---");
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
router.afterEach((to, from) => {
|
||||
// Complete the animation of the route progress bar.
|
||||
//NProgress.done()
|
||||
to;
|
||||
from;
|
||||
// eslint-disable-next-line
|
||||
console.log("---===FINISHED LOADING===---");
|
||||
});
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
|
||||
Reference in New Issue
Block a user