vue v2, vue-router and cordova vue v2, vue-router and cordova vue.js vue.js

vue v2, vue-router and cordova


You're probably loading the files from disk ("file://") and the browser history API pushstate doesn't work when files are loaded from "file://". It works when you remove "mode: history" from the router because it defaults to using hashes.


Set build: assetsPublicPath: 'file:///android_asset/www/'


you have to change in index.jsassetsPublicPath: '/' to assetsPublicPath: './'