What makes the angular.copy() method so powerful?

Technology CommunityCategory: AngularJSWhat makes the angular.copy() method so powerful?
VietMX Staff asked 3 years ago

It creates a deep copy of the variable.

A deep copy of a variable means it doesn’t point to the same memory reference as that variable. Usually assigning one variable to another creates a “shallow copy”, which makes the two variables point to the same memory reference. Therefore if one is changed, the other changes as well.