diff --git a/js/controllers/signOut.js b/js/controllers/signOut.js new file mode 100644 index 000000000..700a0b5d7 --- /dev/null +++ b/js/controllers/signOut.js @@ -0,0 +1,7 @@ +angular.module('copayApp.controllers').controller('signOutController', function(identityService) { + + console.log('En el controller del sign out'); + + identityService.signout(); + +}); diff --git a/js/init.js b/js/init.js index dc66b63be..d6677d3a8 100644 --- a/js/init.js +++ b/js/init.js @@ -13,7 +13,7 @@ angular.element(document).ready(function() { document.addEventListener('pause', function() { if (!window.ignoreMobilePause) { - window.location = '#!'; + window.location = '#!/signout'; } }, false); diff --git a/js/routes.js b/js/routes.js index 7ad3971fe..f8dcf0b9f 100644 --- a/js/routes.js +++ b/js/routes.js @@ -106,6 +106,11 @@ angular .when('/add', { templateUrl: 'views/add.html', logged: true + }) + .when('/signout', { + template: " ", // just fire controller + controller: 'signOutController', + logged: true }); if (config.developmentFeatures) {