Tagged Questions
0
votes
1answer
53 views
Using ember-data to perform a UI update with user defined parameters
I am currently working on an ember.js app, using ember-data with its RESTAdapter to communicate with my service.
I defined the needed ember-data models and everything seems to work fine, but I am not ...
1
vote
1answer
88 views
How do I resolve a model class from a String name in Ember data?
I'm trying to use ember-data, and I need to be able to dynamically resolve a model name given a String.
I looked into the ember-data codebase, but couldn't find anything there. Then I found this in ...
0
votes
0answers
52 views
Problems creating an ember model for testing outside the usual run loop
Trying to create a record and I get the error:
Uncaught TypeError: Cannot read property 'find' of undefined
I see this question has been raised before here: emberjs ember-data and jasmine testing ...
2
votes
0answers
40 views
Can't set Default Values For Number and String Types in Ember Models
I'm trying to set default types in an Ember Model, but only some types work:
createdDate: DS.attr('date', {defaultValue: new Date()}) // Works
createdDate: DS.attr('boolean', {defaultValue: ...
1
vote
1answer
81 views
How Should I Check if an ArrayController's Content isDirty in Ember
In my application's templates I'm using:
{{#if exampleModel.isDirty }}
{{else}}
{{/if}}
... to show different Ui depending on whether the View's Model isDirty. This works nicely.
However I ...
0
votes
1answer
112 views
Ember Data Mapping Missing In Newly Created Model Hash
I have an Ember app tied into a Rails API.
My Model is defined like this:
NewsCMS.NewsItem = DS.Model.extend({
title: DS.attr('string'),
date: DS.attr('date'),
body_html: DS.attr('string')
});
...
0
votes
1answer
45 views
Emberjs Many-to-one Unidirectional Relationship
Does Emberjs support uni-directional relationships? Consider that I want to store information about recipes with three models:
Ingredient
Always exists. Gives a name and description.
Nothing ...
1
vote
1answer
599 views
Ember.js: how to save a model
From the ember docs its clear you should be able to save a dirty model
var m = App.MyModel.find(10) ;
...
m.set("firstName", "John") ;
m.get("isDirty") ; // --> true
Now, I don't know how to ...
0
votes
2answers
509 views
EmberJS: model not initialized with data (ember-data)
I'm trying to load some JSON from the backend and initiate a model. So far, I think I get the model, but without its properties set :(
Here is my test code:
window.App = Ember.Application.create();
...
0
votes
1answer
127 views
Can the current version of Emberjs.Data be used for projects in production?
I am looking for a Javascript MVC framework and have found Ember.js. In conjunction with my development team, we decided that it was the one we would use. (For reference, we compared Ember, Backbone, ...