如何从url中删除hashbang?
如何删除hashbang #! 从url? 
 我发现在vue路由器文档中禁用hashbang的选项( http://vuejs.github.io/vue-router/en/options.html ),但是这个选项删除了#! 只是把# 
有什么办法可以有干净的url吗?
例:
  NOT: #!/home 
 但是: /home 
 你实际上只是想将mode设置为'history' 。 
 const router = new VueRouter({ mode: 'history' }) 
确保你的服务器被configuration为处理这些链接。 https://router.vuejs.org/en/essentials/history-mode.html
对于Vue 1,请改用它:
 const router = new VueRouter({ history: 'true' }) 
对于vue.js 2请使用以下内容:
 const router = new VueRouter({ mode: 'history' }) 
 window.router = new VueRouter({ hashbang: false, //abstract: true, history: true, mode: 'html5', linkActiveClass: 'active', transitionOnLoad: true, root: '/' }); 
和服务器configuration正确在Apache中,你应该写的URL重写
 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L] </IfModule> 
哈希是默认的vue-router模式设置,因为使用哈希,应用程序不需要连接服务器来提供url。 要更改它,您应该configuration您的服务器并将模式设置为HTML5 History API模式。
对于服务器configuration,这是帮助您设置Apache,Nginx和Node.js服务器的链接:
https://router.vuejs.org/en/essentials/history-mode.html
那么你应该确保,vue路由器模式设置如下:
vue-router版本2.x
 const router = new VueRouter({ mode: 'history', routes: [...] }) 
要清楚,这些都是可以select的vue-router模式:“hash”| “历史”| “抽象”