Get the app version of a cordova application. Note that it shows the app version which is present to the user not the build version which is only for internal use.
In your project directory:
cordova plugins add https://github.com/confile/AppVersion
window.Appversion.getVersionNumber(function(versionNumber) {
console.log('versionNumber: '+versionNumber);
});
Note: The android version returns the android:versionName value of AndroidManifest.xml
IOS and Android, windows Phone will be supported later.