Skip to content

Instantly share code, notes, and snippets.

Philipp Spinnler philippspinnler

Block or report user

Report or block philippspinnler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@philippspinnler
philippspinnler / merge.js
Created Mar 31, 2015
Angular function to merge two objects. This method will be in angular 1.4 but is missing in previous versions.
View merge.js
function merge(dst, src) {
var h = dst.$$hashKey;
if (!angular.isObject(src) && !angular.isFunction(src)) return;
var keys = Object.keys(src);
for (var j = 0, jj = keys.length; j < jj; j++) {
var key = keys[j];
var src_new = src[key];
if (angular.isObject(src_new)) {
You can’t perform that action at this time.