Closed veronesecoms closed 6 years ago
I need to check the version of the application to do validations, the problem is that the promisse getVersionNumber () is returning me undefined.
I tried something like:
$ ionic cordova plugin add cordova-plugin-app-version $ npm install --save @ionic-native/app-version
ngOnInit (): void { let versionApp; this.appVersion.getVersionNumber (). then (version => { versionApp = version; });
this.dialogs.alert (versionApp);
However within the alert it is returned undefined. In my config.xml, the version is populated as follows:
<widget id = "idapp" version = "0.0.4" xmlns = "http://www.w3.org/ns/widgets" xmlns: cdv = "http://cordova.apache.org/ns/1.0" >
sorry, my code is wrong.
that's work when the dialogs is inside the .then
I need to check the version of the application to do validations, the problem is that the promisse getVersionNumber () is returning me undefined.
I tried something like:
$ ionic cordova plugin add cordova-plugin-app-version $ npm install --save @ionic-native/app-version
this.dialogs.alert (versionApp);
However within the alert it is returned undefined. In my config.xml, the version is populated as follows:
<widget id = "idapp" version = "0.0.4" xmlns = "http://www.w3.org/ns/widgets" xmlns: cdv = "http://cordova.apache.org/ns/1.0" >