Consider this scenario
mounted () {
this.$router.push({
path: '/activatewithphone',
query: { serial: this.$route.params.serial, machine: this.$route.params.machine }
})
},
This setup ensures that when a user accesses a URL like the following
http://example.com/activate?serial=sddsdsds&machine=sdsdsd
No 404 error page will be displayed to the user.
The values of serial and machine are subject to change.
I am interested in knowing if there is a method to capture these values and retain their data during mounting
For example
data: () => {
return {
serial: '',
email: '',
}
},
Is it possible to extract the value and assign it to my serial and email variables, perhaps by utilizing this.serial