diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-11-02 14:56:45 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-11-02 14:56:45 -0400 |
| commit | 479b09f62d150cd56990be3d638c6b5f9dc5587c (patch) | |
| tree | ba3361ab9418ebb755289f70450d25d51168e700 /www/js/DataModel.js | |
| parent | 22c27c6b6e53c17604f03466f573241c6e801a15 (diff) | |
bazillion changes/cleanup - I think I got the big offender it was unload handler in app.js #550
Diffstat (limited to 'www/js/DataModel.js')
| -rwxr-xr-x | www/js/DataModel.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 8f702c66..12e90ab3 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -9,8 +9,8 @@ angular.module('zmApp.controllers') -.service('NVRDataModel', ['$http', '$q', '$ionicLoading', '$ionicBackdrop', '$fileLogger', 'zm', '$rootScope', '$ionicContentBanner', '$timeout', '$cordovaPinDialog', '$ionicPopup', '$localstorage', '$state', '$ionicNativeTransitions', '$translate', '$cordovaSQLite', - function($http, $q, $ionicLoading, $ionicBackdrop, $fileLogger, +.service('NVRDataModel', ['$ionicPlatform', '$http', '$q', '$ionicLoading', '$ionicBackdrop', '$fileLogger', 'zm', '$rootScope', '$ionicContentBanner', '$timeout', '$cordovaPinDialog', '$ionicPopup', '$localstorage', '$state', '$ionicNativeTransitions', '$translate', '$cordovaSQLite', + function($ionicPlatform, $http, $q, $ionicLoading, $ionicBackdrop, $fileLogger, zm, $rootScope, $ionicContentBanner, $timeout, $cordovaPinDialog, $ionicPopup, $localstorage, $state, $ionicNativeTransitions, $translate) { @@ -276,13 +276,18 @@ angular.module('zmApp.controllers') val = val.replace(regex1, "<password removed>"); val = val.replace(regex2, "<password removed>"); } - $fileLogger.debug(val); + + $ionicPlatform.ready(function () { + $fileLogger.debug(val); + }); //console.log (val); } } function log(val, logtype) { + + if (loginData.enableLogs) { if (val !== undefined) @@ -298,7 +303,9 @@ angular.module('zmApp.controllers') // make sure password is removed //"username":"zmninja","password":"xyz", //val = val.replace(/\"password:\", - $fileLogger.log(logtype, val); + $ionicPlatform.ready(function () { + $fileLogger.log(logtype, val); + }); // console.log (val); } } @@ -652,6 +659,9 @@ angular.module('zmApp.controllers') { // console.log("****** DATAMODEL INIT SERVICE CALLED ********"); + + + log("ZMData init: checking for stored variables & setting up log file"); localforage.getItem("latestBlogPostChecked") |
