DS.Store#serializerFor()

serializerFor (modelName) DS.Serializerpublic

Defined in addon/-private/system/store.js:2402

Returns an instance of the serializer for a given type. For example, serializerFor('person') will return an instance of App.PersonSerializer.

If no App.PersonSerializer is found, this method will look for an App.ApplicationSerializer (the default serializer for your entire application).

if no App.ApplicationSerializer is found, it will attempt to get the defaultSerializer from the PersonAdapter (adapterFor('person')).

If a serializer cannot be found on the adapter, it will fall back to an instance of DS.JSONSerializer.

Parameters:

modelName String
the record to serialize

Returns:

DS.Serializer
doc_EmberJs
2016-11-30 16:50:57
Comments
Leave a Comment

Please login to continue.