When I am trying to copy a new object to an old object via angular.copy, its reference gets changed. If I use = or JSON.parse(JSON.stringify(newObj)), the view is not updated with new value.
How can I solve this?
Code example:
$scope.value = newValue.ref;
View is not updated in this instance.
$scope.value = angular.copy(newValue.ref);
View is updated, but reference is changed.