Melvin Melvin - 1 year ago 143
Javascript Question

What is the equivalent of jQuery $.extend() in Ember.js?

I used to clone a variable in jquery like this:

var clone = $.extend(true, {}, orig);

Is there any method in Ember.js that is equivalent to this?

Answer Source

Yes there is: Ember.copy

var clonedObj = Ember.copy(originalObj, true);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download