bwc
This commit is contained in:
parent
04fb7ba032
commit
320de62f13
348 changed files with 7745 additions and 30874 deletions
24
src/js/services/applicationService.js
Normal file
24
src/js/services/applicationService.js
Normal 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;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue