I am baffled by this one. In the angular api and on github there is a merge function which does a deep merge on two objects, unlike extend() which does a shallow copy.
I use google's cdn for angular, and call angular.extend('param') works, but calling angular.merge('param') gives undefined function. Comparing the angular.js from google and the one from angular them selves, merge does exist on the angular one, but not in google.
Any ideas, or someone else with this problem. Could I let google know somehow?
Feel like a fool, it is only available in the beta version 1.4 Hope this still is able to help someone who is wondering as well. :)
Also copied it from the latest version:
//Leave out the {} to directly change src
function merge(src, newObj) {
return angular.extend({},src, newObj);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With