Is it necessary to use DS.hasMany pointing to a DS.Model when a model contains an array? Even if the array elements are not really models (no IDs or endpoints of their own)? Is there a better way? I am using DS.hasMany, but my extended DS.RESTAdapte...
The Ember.js REST Adapter expects the JSON to be returned as: { "person": { "first_name": "Barack", "last_name": "Obama", "is_person_of_the_year": true } } But my API...
I am attempting to set a property to the value of a model's async, hasMany relationship. But I'm not able to return any value within the then function. App.Athlete = DS.Model.extend({ name: DS.attr('string'), age: DS.attr(...
Enviroment # Ember : 1.4.0 # Ember Data : 1.0.0-beta.7+canary.b45e23ba Model I have simplified my use case to make the question easier to understand and anwser. Let's assume we have 3 models: Country, Region and Area: Country: - id:...
Say I have the following ember-data model: App.Person = DS.Model.extend({ firstName: DS.attr('string'), lastName: DS.attr('string'), starred: DS.attr('boolean') }); This communicates with a Rails app with the...
I want to cache the result of a query in ember-data. (findQuery) To make it clear: I don't want to cache the entire models; just what models are the result of the query. Where is the right place for this? I was thinking about implementing this...
I need to understand once for all why property like isSettled isPending isFulfilled are different if I'm including or not the data in my API respone. I'm asking here this: https://discuss.emberjs.com/t/ember-2-show-a-single-loading-message...
i have a json data from my server: { "post": { "id": 1, "title": "Progressive Enhancement is Dead", "comments": ["1", "2"], "links": { "user": "/peop...
I am using ember.js 1.2 and facing a problem while trying to display loading spinner and notification messages during the crud operations on my models. Here is the code : var MyModelController = Ember.ObjectController.extend({ needs: ['appli...
How come the computed property student.successfulEvaluations does not update unless the page is refreshed? http://emberjs.jsbin.com/keduco/edit?html,js,output App.Student = DS.Model.extend({ username: DS.attr('string'), evaluations: DS....
©2020 All rights reserved.