[Vuejs]-Add query parameter of some url to every url of the site in vue js project

0👍

I’m not sure I understood. But you can access the inviteId with Vue-router in any component by doing:

this.$route.query;

The on created life hook or on a watch you can do something like:

this.$router.push({ path: 'new-path', query: this.$route.query });

Vue Router Docs: https://router.vuejs.org/guide/

0👍

Try the following to get url from browser http and use it axios. Hope this is helpful

mounted(){            
       
        axios.get(this.url)
                .then(response => { this.list = response.data });
    },         
    data:
    {          
        list :'',          
        url:'/progress/getmonthlyreportdata/?'+ window.location.search.substring(1)
    },

Leave a comment