ref $window.appConfig as service

This commit is contained in:
Javier 2016-12-27 15:19:53 -03:00
commit 4b3f9a6c99
21 changed files with 57 additions and 52 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, $window, lodash, externalLinkService, configService, platformInfo, feedbackService, ongoingProcess, popupService) {
angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, appConfigService, lodash, externalLinkService, configService, platformInfo, feedbackService, ongoingProcess, popupService) {
$scope.score = parseInt($stateParams.score);
var isAndroid = platformInfo.isAndroid;
var isIOS = platformInfo.isIOS;
@ -12,7 +12,7 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
"Email": lodash.values(config.emailFor)[0] || ' ',
"Feedback": ' ',
"Score": $stateParams.score,
"AppVersion": $window.version,
"AppVersion": appConfigService.version,
"Platform": ionic.Platform.platform(),
"DeviceVersion": ionic.Platform.version()
};

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) {
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, appConfigService, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) {
$scope.sendFeedback = function(feedback, goHome) {
@ -10,7 +10,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
"Email": lodash.values(config.emailFor)[0] || ' ',
"Feedback": goHome ? ' ' : feedback,
"Score": $stateParams.score || ' ',
"AppVersion": $window.version,
"AppVersion": appConfigService.version,
"Platform": ionic.Platform.platform(),
"DeviceVersion": ionic.Platform.version()
};