Problem with appversion plugin


#1

Hi,
I’m trying to use this plugin and found an error, basically if you use device ready works well but if you try to use ionicReady don’t
This are the two pieces of code, the first one working well and the second never being called

Version with deviceready
.run([’$cordovaAppVersion’, function($cordovaAppVersion) {
document.addEventListener(“deviceready”, function () {
$cordovaAppVersion.getAppVersion().then(function (version) {
alert(version);
});
}, false);
}])

Version with ionicPlatform.ready
.run([’$ionicPlatform’, ‘$cordovaAppVersion’, function($ionicPlatform, $cordovaAppVersion) {
$ionicPlatform.ready(function() {
$cordovaAppVersion.getAppVersion().then(function (version) {
alert(version);
});
});
}])

I can live with this but took me some time to notice it.