Touring-Vue-Router
Touring-Vue-Router copied to clipboard
L10-end not working
Hi, I am getting the following error inside the console when clicking on Events in navigation.
function beforeRouteEnter(routeTo, routeFrom, next) {
nprogress__WEBPACK_IMPORTED_MODULE_3___default.a.start();
_services_EventService_js__WEBPACK_IMPORTED_MODULE_2__["default"].getEvents(2, parseInt(routeTo.query.page) || 1).then(function (response) {
console.log("inside then response handling");
next(function (comp) {
comp.events = response.data;
comp.totalEvents = response.headers['x-total-count'];
});
}).catch(function () {
next({
name: 'NetworkError'
});
}).finally(function () {
nprogress__WEBPACK_IMPORTED_MODULE_3___default.a.done();
});
}```
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.
Might worth mentioning to anyone having a similar issue.
inside of package.json after changing inside of "dependencies"
"vue-router": "^4.0.4" to "vue-router": "^4.0.0" and running npm install again I got the example to work.