vendredi 31 août 2018

How to push data to ember's store of a model that have a JSONSerializer as it's Serializer insted of JSONAPISerializer or RESTSerializer in Ember js?

For a model which is using JSONAPISerializer as it's Serializer pushing a record for that model into the store is done by store.push(dataInJSONAPISerializerFormat) https://www.emberjs.com/api/ember-data/3.3/classes/DS.Store/methods/push?anchor=push method.But for the model which is using RESTSerializer as it's Serializer pushing a record for that model into the store is done by store.pushPayload("modelName",dataInRESTSerializerFormat) https://www.emberjs.com/api/ember-data/3.3/classes/DS.Store/methods/pushPayload?anchor=pushPayload method. But incase of JSONSerializer both of them are not working? Can anyone Help me?




Aucun commentaire:

Enregistrer un commentaire