I am trying to create a dynamic ember data models.I have tried this code in route\user
like:
var tableColumns = {
name: DS.attr('string'),
surname: DS.attr('string')
};
let store = this.get('store');
Ember.getOwner(store).register('model: user', DS.Model.extend(tableColumns));
after creating a model for this.store.findAll(user)
. but it's not working and it shows model user
is not defined.
Aucun commentaire:
Enregistrer un commentaire