Answer the question
In order to leave comments, you need to log in
Why is vue js route not working?
Routes:
const routes = [
{
path: '/',
name: 'home',
component: Home
},
{
path: '/report/:key',
name: 'reportDialog',
component: ReportDialog
}
]
http://localhost:8080/report/f7f0833d7ace1e53f1391f0f204dd68f366c79092248a5dca13e019da2dd5083#/
// vue.config.js
module.exports = {
devServer: {
proxy: {
'^/api/': {
target: 'http://backend.loc/',
changeOrigin: true // so CORS doesn't bite us.
},
'^/api-assets/': {
target: 'http://backend.loc/',
changeOrigin: true // so CORS doesn't bite us.
}
}
}
}
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