Custom Transforms
By specifying custom ember-data transforms, we can define new types of attributes on our model. We'll build our own "color", "array" and "object" custom ember-data transforms.
-
Custom TransformsTransforms vs. Other Options
Ember-data transforms allow us to define other types of model attributes. We'll look at the practical differences between using transforms, compared to computed properties or serializer logic. Then, we'll finish by defining the parts needed for a complete ember-data transform, and go through a non-trivial example together.
-
Custom TransformsExercise: Three Transforms
Build three transforms so that you can access some interesting API data on our large example app:
- RGB color
- Array
- Object
With reasonable unit tests for at least one of the three. Ensure that you handle important edge cases (like null value) appropriately.