angular.merge

Improve this Doc View Source angular.merge

  1. function in module ng

Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2).

Unlike extend(), merge() recursively descends into object properties of source objects, performing a deep copy.

Usage

angular.merge(dst, src);

Arguments

Param Type Details
dst Object

Destination object.

src Object

Source object(s).

Returns

Object

Reference to dst.

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.5.11/docs/api/ng/function/angular.merge

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部