Home

Issue: 2098

Extending the VueRouter instance

[issue link]

I have an application I am currently converting to use nuxt.js and I have a slight issue with the methods for interacting with VueRouter. In my current application I am overriding the following methods in my router to parse the query string using qs

    parseQuery (query) {
        return Qs.parse(query)
    }
    stringifyQuery( query) {
        var result = Qs.stringify(query)
        return result ? ('?' + result) : ''
    },

There does not appear to be a way to achieve this in nuxt.js.

I understand keeping the API simple for interacting with the router, however, would it be so bad if everything passed to the router property was then passed on to the VueRouter instance?

If there is already a way to achieve this in nuxt, would anybody be able to point me in the right direction?

This question is available on Nuxt.js community (#c1860)