diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js index 3ee1f0a22..92c3569f8 100644 --- a/js/controllers/createProfile.js +++ b/js/controllers/createProfile.js @@ -1,11 +1,12 @@ 'use strict'; -angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService, pinService) { +angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService, pinService, isMobile) { var _credentials, _firstpin; $scope.init = function() { identityService.goWalletHome(); + $scope.isMobile = isMobile.any(); pinService.makePinInput($scope, 'newpin', function(newValue) { _firstpin = newValue; @@ -88,7 +89,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun } else { $scope.error = null; // mobile - if (isMobile.any()) { + if ($scope.isMobile) { _credentials = { email: form.email.$modelValue, password: form.password.$modelValue, diff --git a/js/controllers/home.js b/js/controllers/home.js index 8752fc501..1c08e4514 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -6,6 +6,8 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc var _credentials, _firstpin; $scope.init = function() { + $scope.isMobile = isMobile.any(); + // This is only for backwards compat, insight api should link to #!/confirmed directly if (getParam('confirmed')) { var hashIndex = window.location.href.indexOf('/?'); @@ -158,7 +160,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc $scope.confirmedEmail = false; // mobile - if (isMobile.any() && !$rootScope.hasPin) { + if ($scope.isMobile && !$rootScope.hasPin) { $scope.done(); _credentials = { email: email, diff --git a/views/create.html b/views/create.html index bed518cc8..011ff3ccd 100644 --- a/views/create.html +++ b/views/create.html @@ -32,7 +32,7 @@