i am working with angularJS and im pretty newbie. So i have a variable in the controller scope which looks like this.
$scope.emptyContact = {'contact_firstname':'', 'contact_lastname':''};
and i want to use this to reset the newContact
json which i use to add data with a form. But when i do this:
$scope.newContact = $scope.emptyContact;
when i change something in the newContact
variable, it also changes into emptyContact
variable. Is there a way to give newContact
variable the values from emptyContact
without 'binding' their datas together ?
Thank you, Daniel!