Ember loading data models?

I would like to download an application with data without having to make an additional request. Assuming I have a simple user model with the following json:

{"user":{"id":1,"email":"test@example.com"}}

This json is reset by the Rails application. What is the best way to upload my model Userto Ember?

+5
source share
2 answers

Using

App.Store.load(App.YourModel, yourdata);

See this question:

Ember data self-tuning model objects

edit: I’m not sure that you can load several objects at once - you may need to loop your collection. Suggest using something like underscore.js

+6
source

All Articles