Melvin Melvin - 1 year ago 92
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);