Questions tagged [ember-data]

ember-data is a data persistence extension for the Ember.js framework.

Because the MVC framework builds applications which run in the browser rather than returning fully-rendered pages in response to browser requests, it requires a method for saving and reloading user data.

Ember.js supports a number of "data persistence" libraries, including a data store component inherited from the framework. In general these frameworks support CRUD operations on a RESTful web service, and as such they are agnostic regarding the technology of the back-end web service.

Ember-data is the "official" data persistence library for Ember.js, supported by the Ember.js team. It uses "adapters" to load data for use by Ember.js applications, and allows developers to write custom adapters to support their own specific data store.

Beta Period

During the beta period (up until 1.0) the API is constantly changing, you can keep up to date by reading the Transition Document.

Getting help

Ember-data is supported in much the same way as Ember.js itself.

The Stack Overflow tag is actively monitored by several contributors to Ember. You may try asking questions in the active IRC channel #emberjs on irc.freenode.net. Other resources can found on the Ember.js community page

Technical questions that are accompanied by working code make it easier for other to help give good answers. JSFiddle | JSBin

To report bugs against Ember.js, or to propose new functionality, create an issue on the Github project.

5458 questions
2
votes
1 answer

Emberjs: what is the preferred way to load data into a controller?

I can think of 4 options: 1) in the router : connectOutlets: function(router) { router.get('applicationController').connectOutlet(outlet, controller/view, router.get('store').findAll(Model); } this will invoke findAll each time the…
Gal Ben-Haim
  • 16,546
  • 19
  • 71
  • 127
2
votes
1 answer

Best way to namespace multiple or suit of emberjs apps

First a Merry Xmas to you and thanks for helping with suggestions. My question is still on emberjs namespace but this time in the context of a suite of multiple emberjs apps which will be contained within multiple rails-engine, so that each emberjs…
brg
  • 3,615
  • 6
  • 33
  • 62
2
votes
0 answers

ember-data custom adapter createRecord model is empty

I'm trying to create a custom adapter according to the docs and I'm facing a problem that the model that is being passed to createRecord is an empty ember-data object (tried it with console.log(model), there are no attributes). using RESTAdapter…
Gal Ben-Haim
  • 16,546
  • 19
  • 71
  • 127
2
votes
1 answer

ember-data - record not found (404)

How are people handling 404 errors from ember-data? At the moment, the rest-adapter handles errors in this way: didError: function(store, type, record, xhr) { if (xhr.status === 422) { var data = JSON.parse(xhr.responseText); …
dagda1
  • 21,477
  • 48
  • 188
  • 367
2
votes
1 answer

ember-data - when, where an how to create the persistent store

With ember data, where is the best place to create the store. Should I create it before I create the application object? Should I create it as a property of the application object, e.g. app = Ember.Application.create() app.set('Store',…
dagda1
  • 21,477
  • 48
  • 188
  • 367
2
votes
1 answer

ember-data: how to get embedded json

My Json Data looks like this: {"user":{"id":1, "name":"bob", "profile":{"id":1, "forename":"Foo", "surname":"Bar", "user_id":1}} My model looks like: App.User = DS.Model.extend({ …
Robin Wieruch
  • 10,245
  • 6
  • 68
  • 90
2
votes
1 answer

How to realize meteor like real-time features in ember.js and ember-data?

I'm evaluating ember.js with ember-data and meteor for a single-page web app. So far my conclusion is that meteor can best be compared with a combination of ember.s and ember data while ember data takes the role of minimongo. I really like the…
vanthome
  • 4,469
  • 33
  • 41
2
votes
1 answer

ember-data dynamic number of DS.attr 's

So i have a ember-data model and i want my users to be able to create different / more DS.attr per item and call them whatever they like. This will then send the json to rails server where i am using mondodb. I can then check to see if key is…
Rick Moss
  • 926
  • 1
  • 16
  • 34
2
votes
3 answers

How to use DS.Store.registerAdapter

I try to use the 'adapter per type' feature of ember-data. Not sure whether I'm doing something wrong or if it's a bug in ember-data. Basically i thought it would work like this: Person = DS.Model.extend({ name: DS.attr('string') }); var…
claudiocro
  • 83
  • 1
  • 5
2
votes
3 answers

Getting latest build of ember-data

Building ember-data requires Ruby 1.9. Installing this version of Ruby on MacOS Mountain Lion is not a trivial task, so I'm not keen on trying this. I wonder if anyone else could perform this build for me and send me the built package. The version…
Rudi Angela
  • 1,391
  • 1
  • 12
  • 19
2
votes
1 answer

Acces parent record from an embedded object

Is there a way to access to the parent object of an embedded model object ? For example : App.Person = DS.Model.extend({ name : DS.attr('string'), emails : DS.hasMany('App.Email', { embedded: true }) }); App.Email = DS.Model.extend({ …
ThomasDurin
  • 1,775
  • 1
  • 13
  • 20
2
votes
2 answers

Automatically loading models referenced in a template with ember-data

I would like to have model binding relationships loaded automatically when referenced in a template. For example, if I have models like this: App.User = DS.Model.extend name: DS.attr 'name' App.Contact = DS.Model.extend addedBy:…
2
votes
2 answers

How do you use ember.js with external (non-local) api endpoints?

Has anyone had success working with a front-end only applications with Ember.js and consuming endpoints from an external host? If so please share your experience. Here are a couple of options. Make the requests through a local proxy (just pass…
bobbywilson0
  • 1,032
  • 6
  • 17
2
votes
0 answers

Ember data batched loading

I have a page with many records on it and it's slow to load. What I'd like to do is load the records in batches. Let's say there are 1000 records in total and I want to load 30 at a time. Looking at the page you would see records being added in…
opsb
  • 26,793
  • 17
  • 85
  • 96
2
votes
1 answer

How do you filter the content collection of an ArrayController in Ember.js using a checkbox in a view?

I am using the latest code for both Ember and Ember-Data. I have rails as my backend supplying JSON, which is working fine. I want to be able to filter on the "active" property of the Ember model using a checkbox in my view. I want the checkbox to…
Jason Cochran
  • 316
  • 3
  • 10
1 2 3
99
100