Use private var

This commit is contained in:
brantje 2016-09-15 07:09:39 +02:00
parent c16dbcd818
commit d21d75d976

View file

@ -32,15 +32,14 @@ angular.module('passmanApp')
};
$scope.editCredential = function(credential){
var credential = angular.copy(credential);
var _credential = angular.copy(credential);
$rootScope.$emit('app_menu', false);
SettingsService.setSetting('edit_credential', CredentialService.encryptCredential(credential));
$location.path('/vault/'+ $scope.active_vault.vault_id +'/edit/'+ credential.credential_id)
SettingsService.setSetting('edit_credential', CredentialService.encryptCredential(_credential));
$location.path('/vault/'+ $scope.active_vault.vault_id +'/edit/'+ _credential.credential_id)
};
$scope.selectedCredential = false;
$scope.selectCredential = function (credential) {
console.log(credential);
$scope.selectedCredential = CredentialService.decryptCredential(angular.copy(credential));
$rootScope.$emit('app_menu', true);
};