1

I have a pretty simple page right now that I'm just setting up for future development but it's kind of come to a halt now that my URL keeps getting changed.

import shipmentInformation from './shipment-information.vue';

Vue.use(VueRouter);

let router = new VueRouter({
    base: '/QuickQuote/QuickQuoteRefactor/',
    routes: [
        { name: 'shipmentInformation', path: '/', component: shipmentInformation }
    ]
});

new Vue({
    router
}).$mount('#quickQuoteApp')

This is run on a page where #quickQuoteApp contains a <router-view> element. Users get to this page by navigating to (on local machine) localhost/QuickQuote/QuickQuoteRefactor. The components load and I see the hash get added to the end of the url for a split second (localhost/QuickQuote/QuickQuoteRefactor#) before it changes to localhost/#/ for some reason.

Any ideas on why this is happening. I thought the 'base' option was supposed to take care of this.

1 Answer 1

1

I discovered that this was caused by a conflict between vue-router and jquery.history.js

Not sure of the exact cause but it looked like History was trying to 'correct' the hash changes in the url made by vue-router, therefore breaking it.

Sign up to request clarification or add additional context in comments.

1 Comment

I have no history.js nor any other history state library, still the url is being changed to /#/ under Firefox :<

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.