From db6bcc4d9a890be0b3752e26ce5f4d7143fb5189 Mon Sep 17 00:00:00 2001 From: Matias Pando Date: Thu, 22 Jan 2015 17:14:31 -0300 Subject: [PATCH] Add an explicit call to a controller when signing out --- js/controllers/signOut.js | 7 +++++++ js/init.js | 2 +- js/routes.js | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 js/controllers/signOut.js 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) {