ember.js - Change model type to subclass -
my app deals ton of data call 'subdata' (because it's child of real data , not independent). follow similar format: have ids, type , pointer parent element. works fine in ember.js way have now. server has no notion of type (just field of object), client does. have different ember.js models each type can each have different properties.
my problem need convert normal subdata typed subdata. in adapter , transform json gets in. found more elegant way using filterproperty
method. can make properties filter based on mixed subdata array. ignoring performance (which i'm not worried about), seems cleaner method.
however, resulting array returned filterproperty
array of subdatamodel
s. how can convert models particular subclass of subdatamodel
?
Comments
Post a Comment