该函数angular.merge从源对象中获取所有可枚举属性,以深入扩展目标对象。
该函数返回对现在扩展的目标对象的引用
angular.merge(destination, source)
例子
angular.merge({}, {}) // {} angular.merge({name: "king roland"}, {password: "12345"}) // {name: "king roland", password: "12345"} angular.merge({a: 1}, [4, 5, 6]) // {0: 4, 1: 5, 2: 6, a: 1} angular.merge({a: 1}, {b: {c: {d: 2}}}) // {"a":1,"b":{"c":{"d":2}}}