skeith22
11 months ago
88
3
Vue

this.$route.query is empty on first load

Posted 11 months ago by skeith22

I have this url above on first load

http://domain.test/?access_token=value&refresh_token=value&platform=Android&reseller=value&reseller_account=value

and on my vuejs file

mounted() {
    console.log(this.$route.query);
},

its giving me null

but

beforeRouteEnter (to, from, next) {
    let data = {
        accessToken: to.query.access_token,
        refreshToken: to.query.refresh_token,
        reseller: to.query.reseller,
        resellerAccount: to.query.reseller_account
    };
}

does give me values though..

I want to get the value on first load

Please sign in or create an account to participate in this conversation.