vue router get full string query 1

vue router get full string query

const stringQuery = route.fullPath.split('?')[1] || ''

Here is what the above code is Doing:
1. We’re getting the full path of the route.
2. We’re splitting the full path by the ? character.
3. We’re getting the second item in the array.
4. If there is no second item, we’re setting it to an empty string.

Similar Posts