This commit is contained in:
Matias Alejo Garcia 2015-03-06 12:00:10 -03:00
commit 320de62f13
348 changed files with 7745 additions and 30874 deletions

View file

@ -0,0 +1,24 @@
'use strict';
angular.module('copayApp.services')
.factory('applicationService', function($rootScope, $timeout, isCordova) {
var root = {};
root.restart = function(hard) {
if (isCordova) {
$rootScope.iden = $rootScope.wallet = undefined;
if (hard) {
location.reload();
}
$timeout(function() {
$rootScope.$digest();
}, 1);
} else {
// Go home reloading the application
var hashIndex = window.location.href.indexOf('#!/');
window.location = window.location.href.substr(0, hashIndex);
}
};
return root;
});