How to get App version in Ionicframework


#1

I want to get app version without plugin.

Is there any way to get app version in android app and ios app?

Or… is there the method to get config.xml 's version-code in ionicframework?


#2

I use this https://github.com/whiteoctober/cordova-plugin-app-version

and i create some directive to show app version

.directive('appVersion', function () { return function(scope, elm, attrs) { cordova.getAppVersion(function (version) { elm.text(version); }); }; })

in my template

<small>App v<span app-version></span></small>

but basically you can do it by calling like this

cordova.getAppVersion(function (version) { alert(version); });


#3

A nice little write up about the subject