Explanation :
we come across some situation in which we need to copy one object to another object. In that case, we probably have two solutions: ang
agular.copy
clones (deep copy) an object and creates a new object using the same values, while angular.extend
does a shallow copy so that the attributes refer to same values in memory. A very nice explanation is given here which differentiates very well between .copy()
, .extend()
and .merge()
methods