0
モデル内の属性を変更したい。
モデル/ example.js:Ember.js:RESTSerializerのデータを変更する方法
export default DS.Model.extend({
value: DS.attr('number'),
modified_value: function() {
/*Some Calculations*/
return modified_value
}.property('value'),
})
上記のコードは正常に動作しますが、それは、モデル内の別の余分な属性を作成します。だから、これを避けるために、私はそれをRESTSerializerに移したいと思う。これを行う方法 ?