How to get App version in Ionicframework

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?

I use this

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); });

A nice little write up about the subject