How can I copy an object and lose its reference in Angular?
With AngularJS, I can use angular.copy(object), but I\'m getting some error using that in An
angular.copy(object)
For shallow copying you could use Object.assign which is a ES6 feature
let x = { name: 'Marek', age: 20 }; let y = Object.assign({}, x); x === y; //false
DO NOT use it for deep cloning