W3cubDocs

/Ember.js

DS.Serializer

Extends: Ember.Object
Defined in: addon/serializer.js:7
Module: ember-data

store public

The store property is the application's store that contains all records. It can be used to look up serializers for other model types that may be nested inside the payload response.

Example:

Serializer.extend({
  extractRelationship(relationshipModelName, relationshipHash) {
    var modelClass = this.store.modelFor(relationshipModelName);
    var relationshipSerializer = this.store.serializerFor(relationshipModelName);
    return relationshipSerializer.normalize(modelClass, relationshipHash);
  }
});

© 2017 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://emberjs.com/api/ember-data/2.14/classes/DS.Serializer/properties