Hello I have a problem that I solved yesterday but it appears again.
I try to use a function for routing between my vue pages.
routes.js
import Page from '../components/Page'
const routes = {
Page
}
export const vue = routes
Navigator.js
import { topmost } from 'tns-core-modules/ui/frame'
function navigateTo (page) {
topmost().currentPage.__vuePageRef__.$navigateTo(page)
}
export { navigateTo }
Vue Page:
import {navigateTo} from "../router/navigator";
created: function() {
navigateTo(routes.vue.Page);
}
but it throws me the error
System.err: TypeError: Cannot read property 'currentPage' of undefined
I remember that I have solved the problem yesterday by changing the navigateTo 'function' to a 'default function'.
But this time it throws me an error called:
System.err: TypeError: Object(...) is not a function
when im passing the routes.vue.Page
I would appreciate any help thanks.