How to refresh Vue page while maintaining Vue Router ... | Vue-router refresh
RightnowIhavetwopagesInmyVueprojectandonedependsoftheother,letmeexplainmyself.IhaveinformationGrid.vuewhichIsapagewithagridfullofdataandwhenIclickInarowofthatgridthenIcanlaterclicktoabuttonwhichsendsallthedataoftheselectedrowtotheotherpage,detailsInformation.vue.HowIsendIt?With:this.$router.push({name:"detailsInformation",params:rowData});OnceIndetailsInformation.vueIcheckIfthepageIsrecievingdatawithv-if:
Right now I have two pages In my Vue project and one depends of the other, let me explain myself.
I have informationGrid.vue which Is a page with a grid full of data and when I click In a row of that grid then I can later click to a button which sends all the data of the selected row to the other page, detailsInformation.vue.
How I send It? With:
this.$router.push({ name: "detailsInformation", params: rowData });Once In detailsInformation.vue I check If the page Is recieving data with v-if:
<div v-if="this.$route.params.rowData"> .... </div>Until here all works perfectly, the problem Is that If the user refreshes the entire page with f5 all these data sent by route params Is lost so the page cant show anything.
The question Is, how can I maintain this data even after reloading the entire page?