A couple of days back, I managed to resolve the issue I was facing with navigating through Vue pages. However, after fixing that problem, I made an error by mistakenly attempting to pass an incorrect key value to the Vue page I was redirecting to.
When the navigateTo method is executed on a particular Vue page, the following error occurs:
JS: 'There was an error!' [ReferenceError: test is not defined]
Below is the method used for redirection along with props:
import Vue from "nativescript-vue";
import router from "./router";
Vue.prototype.$changePage = function(to, props, params) {
this.$navigateTo(router[to], {
props,
...params // clearHistory, backstackVisible
});
}
The way I invoked the function was:
goToHome(prop) {
this.$changePage(aspecificpage, { test:'hello' }, { clearHistory: true });
}
Now, whenever I try to access that specific page with incorrect props content, it results in an error. Other pages are being called without any issues. Is there any suggestion on how to solve this problem?
Thank you all in advance for your help.