0

I'm using laravel-5.4 with Vue.js-2.
My url's are like this -> http://localhost/abhishek/cinego/public/#!/movie/list...
I want to remove '#!/' after public in the url. please help. I'm new to vue

sayan0020
  • 36
  • 1
  • 3
  • 9
  • try this `const router = new VueRouter({ mode: 'history' })`. Set mode to history in the Router object. – Pradeepb Sep 05 '17 at 13:25
  • Possible duplicate of [How to remove hashbang from url?](https://stackoverflow.com/questions/34623833/how-to-remove-hashbang-from-url) – Chintan Kotadiya Sep 06 '17 at 04:52
  • @Pradeepb this code doesn't work for me, thanks anyway `const router = new VueRouter({ mode: 'history' });` – sayan0020 Sep 07 '17 at 06:49
  • @chintankotadiya thanks for the suggestion. I'll try all the solution and hopefully one of them work for me – sayan0020 Sep 07 '17 at 06:54
  • @sayan0020 which version of vueJs are you using? – Pradeepb Sep 07 '17 at 07:02
  • This is in my package.json ` "vue": "^1.0.26", "vue-hot-reload-api": "^1.3.3", "vue-html-loader": "^1.2.3", "vue-loader": "^8.5.2", "vue-resource": "^1.0.2", "vue-router": "^0.7.13", ` Thanks in advance, i'm really new to vue, so please bare with me. – sayan0020 Sep 07 '17 at 07:42
  • Ah ok. I thought you were using latest version. Try `var router = new VueRouter({ history: true });`. – Pradeepb Sep 07 '17 at 07:54
  • @Pradeepb sorry to say no luck, when i use this `const router = new VueRouter({ history: true });` my .vue files are not loading at all. – sayan0020 Sep 07 '17 at 08:44
  • How are you defining your routes? Could you post that in the question as well? – Pradeepb Sep 07 '17 at 08:44

0 Answers0