[Vuejs]-How to set url without refreshing the page (Laravel + vueJS)

0👍

After a lot of thinking, I didn’t change my architecture for now, and I only use history.pushstate when the year or idea changes

idea.vue

    watch: {
        idea: function() {
          history.pushState({}, null, '/idea/'+this.idea +'/'+this.year)
        },
        year: function() {
          history.pushState({}, null, '/idea/'+this.idea +'/'+this.year)
        }
    },

Leave a comment