So say you have the following code:
var absenceType = {name: 'hello'};
this.newAbsenceType = angular.copy(absenceType);
Now you make changes to this.newAbsenceType and you wish to apply these changes to the original object.
So ive been looking at extend:
angular.extend( absenceType, this.newAbsenceType);
However this did not do the trick.
What am i doing wrong?
angular.copyreturns "The copy or updated destination, if destination was specified."angular.extend( absenceType, this.newAbsenceType)should work. If it doesn't then you are doing something wrong which you don't show in the question.