From e0ba24662b631394b4076ac39fad970447879f8f Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Fri, 3 Jul 2015 08:31:13 -0400 Subject: Added plugin that picks up version from config.xml and displays in app --- www/js/app.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 6e7b72ed..3abcb634 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -3,6 +3,7 @@ /* global cordova,StatusBar,angular,console */ +var appVersion = "0.0.0"; // core app start stuff angular.module('zmApp', [ 'ionic', @@ -12,6 +13,7 @@ angular.module('zmApp', [ ]) + //------------------------------------------------------------------ // this directive will be load any time an image completes loading // via img tags where this directive is added (I am using this in @@ -220,6 +222,8 @@ angular.module('zmApp', [ console.log("**** DEVICE READY ***"); + + $fileLogger.checkFile().then(function(resp) { if (parseInt(resp.size) > 50000) { @@ -240,7 +244,15 @@ angular.module('zmApp', [ $fileLogger.setStorageFilename('zmNinjaLog.txt'); + if (window.cordova) + { + cordova.getAppVersion(function(version) { + appVersion = version; + ZMDataModel.zmLog ("zmNinja Version: " + appVersion); + ZMDataModel.setAppVersion(appVersion); + }); + } setTimeout(function () { if (window.cordova) @@ -290,6 +302,7 @@ angular.module('zmApp', [ } + }); //platformReady -- cgit v1.2.3