Questions tagged [ember-model]

Ember Model (EM) is a simple and lightweight model library for Ember.

Ember Model (EM) is a simple and lightweight model library for Ember. It intentionally supports a limited feature set. The main goal is to provide primitives on top of $.ajax that are required by Ember.

EM is still very much a work in progress, but it's flexible enough to be used in apps today. It was extracted out of an Ember app. Please see the issues section for a list of bugs and planned features.

Github repository

135 questions
0
votes
1 answer

ember converting ajax query string

I'm using ember-model and doing this request App.Video.find({'sort':'createdAt+asc'}); in order to get sorted video list. So it must make this request http://localhost:1337/api/v1/videos?sort=createdAt+asc But instead it does this…
Alex Berdyshev
  • 761
  • 2
  • 7
  • 21
0
votes
1 answer

Ember-Model: How to establish a hasMany or belongsTo relationship by using a "foreign key"?

Summary I have a bit of a problem using Ember-Model, trying to establish a unique relationship between two models. Based on current responses that I have received here on S.O., Ember Forums, and #emberjs. I am beginning to believe that there is no…
Grapho
  • 1,654
  • 15
  • 33
0
votes
1 answer

Ember-Model: The correct way to define the model class in Ember-CLI?

My specific error message is this: Error while processing route: debtor.index Ember.Adapter must implement find Here is the model that I have defined: var attr = Ember.attr, hasMany = Ember.hasMany; export default Ember.Model.extend({ …
Grapho
  • 1,654
  • 15
  • 33
0
votes
1 answer

access to a related collection in an ember-model object via hasMany relationship

I may fundamentally be misunderstanding how to use the hasMany relationships in Ember/ember-model. the ember-model readme has the following example postJson = { id: 99, title: 'Post Title', body: 'Post Body', comments: [ { id: 1, …
technicolorenvy
  • 486
  • 7
  • 16
0
votes
1 answer

Ember Model RESTAdapter nested endpoint

I'm building a web app using Ember 1.5 and I use Ember Model 0.0.11 to link the app to an API. I'm currently having trouble getting Ember Model to use nested API endpoints. For instance, my app has a User model, which has a hasMany relationship…
MdeWit
  • 1
  • 1
0
votes
1 answer

Ember: Does ember-model allow binding computed values using .properties(...)

I'm trying to get a computed value in my model to update using the .property('key') syntax. My model is like: App.Camera = Em.Model.extend({ id: attr(), uid: attr(), name: attr(), type: attr(), refresh: attr(), …
HypeXR
  • 711
  • 2
  • 6
  • 19
0
votes
0 answers

Sideloaded records disappear when navigating between routes

So I have a trial blog app which is pretty much like this http://emberjs.jsbin.com/conum/3/edit. In my app I use the RESTAdapter instead of the fixtures, but I have no idea how to do REST behavior in the jsbin. This is important because the issue…
Andragan
  • 41
  • 2
0
votes
2 answers

Updating an Emberjs view as objects are updated

I'm using this nice Ember.js mixin: https://github.com/Wildhoney/EmberDroplet to upload images using drag-and-drop and it's working brilliantly. The only problem is, I don't know how to add the images into the view after they have been uploaded. The…
reblevins
  • 99
  • 1
  • 8
0
votes
2 answers

Adding needs: ['ApplicationController'] makes my view dissapear

My Ember.js app is set up roughly like this: Router: App.Router.map -> @resource('site', { path: '/' }, -> @resource('dashboard') @resource('account') @resource('pages', { path: '/:page_slug'})) Routes: App.ApplicationRoute =…
reblevins
  • 99
  • 1
  • 8
0
votes
2 answers

Model Data not loading on direct load of route

I have an application that when following a link-to everything works as expected, but when navigating directly to a child route my model data doesn't seem to load. In my child (types) route I am using this.modelForin my model hook. Here is a bin…
RyanHirsch
  • 1,847
  • 1
  • 22
  • 37
0
votes
0 answers

incorrect display of attributes in child route

I'm using Ember 1.2, Handlebar 1.12, and EmberModel (not EmberData). In my application, I have the common parent/child relationship in my route map, with a simple model similar to that shown below. App.Router.map(function () { …
ptmoy2
  • 311
  • 1
  • 4
  • 13
0
votes
1 answer

Set a different controller's model via action doing a fetch query

I am trying to set the content of an another controller but my model returns undefined. I've tried everything I could think of to get the queried results prior to trying to set the other controller's model. Mapmaker.CategoriesController =…
Michael Guild
  • 808
  • 9
  • 8
0
votes
1 answer

Filtering and rearranging model/content in Ember Controllers

Let's say I have a JSON array of data, something like: [ {"name":"parijat","age":28}, {"name":"paul","age":28}, {"name":"steven","age"27}, ... ] that is part of my model, and this model is setup like this: App.UserRoute =…
Parijat Kalia
  • 4,929
  • 10
  • 50
  • 77
0
votes
1 answer

How to show immediately a property of an associated model after creation?

If I create a new movie object, the associated username from owner (App.User) isn't shown. It shows only after I reload the page. Any idea how I can achieve to show immediately the associated username after I have created a new movie? Code so…
user836968
0
votes
1 answer

Can I pass additional parameters to Ember-Model belongsTo?

I need to pass additional parameters to Ember-Model's belongsTo. I got it to work with its own attribute type. But I need to have relations as well. Is that possible somehow? UserType = { serialize: function(objectId) { return { __type:…
user836968
1 2 3
8 9