Want to represent complex objects in Ember models? If you want the property to be a primitive object and not an Ember Object then you can do the following:
1 2 3 4 |
ObjectTransform = DS.Transform.extend({ deserialize: function(serialized) { return serialized; }, serialize: function(deserialized) { return deserialized; } }); |
This is assuming that you don’t need to change the object at all after it comes in over the wire.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.