[Vuejs]-VueJS always automatic append sharp sign(#/) to all pages at the end of URL

3👍

Add mode: 'history' to the router, this will remove the # sign from the end of the urls.

Some thing like this:

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

You can read more about this here

0👍

If you are using Laravel, add the below line in web.php

Route::get('/{vue?}', 'App\Http\Controllers\AppController@index')->where('vue', '[\/\w\.-]*');
👤Ijas

Leave a comment