extractMeta (store, modelClass, payload)
extractMeta
is used to deserialize any meta information in the adapter payload. By default Ember Data expects meta information to be located on the meta
property of the payload object.
Example
app/serializers/post.js
import DS from 'ember-data'; export default DS.JSONSerializer.extend({ extractMeta: function(store, typeClass, payload) { if (payload && payload.hasOwnProperty('_pagination')) { let meta = payload._pagination; delete payload._pagination; return meta; } } });
Please login to continue.