I'm using Ember Data 2.2.0 and Ember 2.2.1. After retrieving a model from the data store, I'd like to get the model's type name as a string.
According to the API Docs, DS.Model defines a modelName property, which looks like what I want. However, I find that model.modelName
, and model.get('modelName')
are undefined, after retrieving model
from the store with findRecord
.
On the other hand, model._internalModel.modelName
returns the lowercased, dasherized name of the model, as expected.
What's going on here?
Aucun commentaire:
Enregistrer un commentaire