copy object para la modificación del cliente

This commit is contained in:
nelo 2017-01-16 07:30:38 +01:00
parent d59beccd49
commit b9e4f8fc92
2 changed files with 4 additions and 3 deletions

View File

@ -26,4 +26,4 @@
</vn-vertical>
</vn-card>
</form>
<vn-confirm-client client="basicData.client" state="basicData.state"></vn-confirm-client>
<vn-confirm-client client="basicData.client" client-old="basicData.clientOld" state="basicData.state"></vn-confirm-client>

View File

@ -7,14 +7,15 @@ export const COMPONENT = {
controllerAs: 'clientConfirm',
bindings: {
state: '<',
client: '='
client: '=',
clientOld: "="
},
controller: function($state, $element, copyObject){
var dialog = $element.find('dialog')[0]
this.accept = function(){
this.client.navigate = true;
copyObject(this.clientOld, this.client);
$state.go(this.state);
dialog.close();
}