Answer the question
In order to leave comments, you need to log in
How to remove # from end of vue-router url?
I use vue-router to go inside the product, but the # sign is added to the end and when returning to the previous page with the back button, first the # is removed from the url, then it returns to the previous page, i.e. you need to click back twice. hashbang: false, mode: 'history' added, didn't help.
When you go to the product, you get a url like this: localhost:8080/shop/braids/32# Required
: localhost:8080/shop/braids/32
router
export default new Router({
hashbang: false,
mode: 'history',
routes: [
{
path: '/shop/braids/:name',
component: CanekalonsComponent
},
]
})
methods: {
viewCategory () {
this.$router.push('/shop/braids/' + this.category.name)
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question