diff --git a/www/assets/js/controllers.js b/www/assets/js/controllers.js index e267713d2..557f43764 100644 --- a/www/assets/js/controllers.js +++ b/www/assets/js/controllers.js @@ -627,11 +627,6 @@ NGApp.controller( 'GiftcardCtrl', function ($scope, $location, GiftCardService ) setTimeout( function(){ GiftCardService.open(); }, 300 ); }); -NGApp.controller('reset', function ($scope, $location, AccountModalService) { - $scope.modal = AccountModalService; - $scope.modal.resetOpen(); - $location.path( '/' ); -}); NGApp.controller( 'AccountModalHeaderCtrl', function ( $scope, $http, AccountModalService ) { $scope.modal = AccountModalService; @@ -660,8 +655,12 @@ NGApp.controller( 'AccountSignUpCtrl', function ( $scope, $http, AccountModalSer }); }); -NGApp.controller( 'AccountResetCtrl', function ( $scope, $http, AccountResetService ) { - $scope.reset = AccountResetService; +NGApp.controller( 'AccountResetCtrl', function ( $scope, $http, $location, AccountResetService, AccountModalService ) { + if( $location.path().indexOf( 'reset' ) >= 0 ){ + $scope.reset = AccountResetService; + AccountModalService.resetOpen(); + $location.path( '/' ); + } }); NGApp.controller( 'GiftCardCtrl', function ( $scope, $http, $rootScope, GiftCardService ) {