Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
The '#' in my url is not right when I use vue-router with express

The URL is shown as

localhost:3000/index#/dashboard

but not

localhost:3000/index/#/dashboard

It's kind of wired.

Here is my express code.

app.get('/index', function (req, res) {
    const html = fs.readFileSync('index.html', 'utf-8');
    res.send(html);
});

And my vue-router code.

{
  name: 'dashboard',
  path: '/dashboard',
  component: require('../views/dashboard.vue')
}
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Try setting the mode: 'history' in your VueRouter

const router = new VueRouter({
  mode: 'history',
  routes: [...]
})

For more info also with express, refer to Vue Router HTML5 history mdoe

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!