[Vuejs]-Nativescript-vue navigateTo vue page props is cached

1👍

main.js

import Vue from 'nativescript-vue'
import Bootup from './components/App'
import Select from './components/Select/StationSelect'
import RouteDetails from "./components/Route/SingleTrain/Details"

const router = {
    Bootup: Bootup,
    Select: Select,
    RouteDetails: RouteDetails
};

Vue.prototype.$router = router;

Vue.prototype.$changePage= function (to, props = null) {
    this.$navigateTo(this.$router[to], props)
};

someVuePage.vue


goToHome() {
    this.$changePage('MultiRouteDetails', {
        props: {
            test: "hello"
        }
    });
}

👤Steven

Leave a comment