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

find() and find(id) triggering Ajax calls to the server

In my application, I have the common parent/child relationship in my route map. App.Router.map(function () { this.resource('strats', {path: "/"}, function() { this.route('strat', {path: "/strat/:strat_id"}); }); }); My understanding…
ptmoy2
  • 311
  • 1
  • 4
  • 13
0
votes
1 answer

Ember-model create() not creating an ID and adapter must implement "createRecord"

still trying to build an invoicing app using ember-model and hasMany relationships using the FixtureAdapter for now. When i try to create a new invoice record, i get a new invoice without error, but without an ID at all (it is undefined), am i…
Wilhearts
  • 169
  • 1
  • 1
  • 6
0
votes
2 answers

Ember-Model EmbeddedHasManyArray not updating in template's each helper

I am using ember-model for a simple invoicing app, i am new to ember and i cannot fix what's happening here, basically i am using ember-model's hasMany for embedded nested data, (the items for each invoice are in an array), i tried putting the code…
Wilhearts
  • 169
  • 1
  • 1
  • 6
0
votes
2 answers

How to wait until find method has finished before doing further processing in Ember Model

How can I wait until my find method has finished loading the model from the backend? After the model has loaded I want to fetch additional data and decorate my movie model with that data. The request to the external api from which the additional…
user836968
0
votes
1 answer

Ember.RSVP always falling to failed routing

I'm using the code shown below to save a new record in Ember-Model. var saveResult = this.get('model').save(); saveResult.then (function(value) {$('#statusArea').html('Save succedded.\n'), function(value)…
ptmoy2
  • 311
  • 1
  • 4
  • 13
0
votes
1 answer

ember property.length works when accessed from template, but is undefined when accessed from controller

Please see: http://jsbin.com/UZETowi/3/edit This code runs fine locally on my computer, but doesn't run in JSBin for some reason. What's wrong? Here's my problem: accessing items.length from the handlebars template produced the correct answer, but…
ptmoy2
  • 311
  • 1
  • 4
  • 13
0
votes
1 answer

Computed properties with ember-model?

I have a simple model that worked with ember-data but not sure how to get this to work with ember-model? Acme.App = Ember.Model.extend( post_screenshot_url: Ember.attr() post_screenshot_url_thumb: (-> @get('post_screenshot_url') +…
Daniel Fischer
  • 3,042
  • 1
  • 26
  • 49
0
votes
2 answers

Reloading a route's model with server json data and need ember-related opinion

I’m building a map with a search function. Basically, I’d like to store objects from the server within my ember app so that whenever I search for something that collection updates itself with the results from the server so the related view updates…
Tommy B.
  • 3,591
  • 14
  • 61
  • 105
0
votes
1 answer

Ember-Model init issue

I concatinate my application code from multiple js files into one js file. Therefore I can't control the order, and to be honest would not want to. To specify a custom adapter with ember-model you need to create an instance of it like…
Denzo
  • 431
  • 1
  • 4
  • 15
0
votes
1 answer

Filter array of children by parent id

Here's a basic post/comments. When I create new comments, they're added with a post: attr() that matches the id of the post with which they relate to. I want to make a filter so that when choosing a specific post and navigating to the comments…
Max
  • 246
  • 1
  • 6
0
votes
1 answer

Uncaught TypeError: Object [object Object] has no method 'deleteRecord'

I am using ember-model here. I am trying to delete record from array which is one of the node of fixture. This (cart_items) array has hasMany relation with model. I have posted my complete code here. Here, i am trying to delete row from table using…
Sachin
  • 2,321
  • 11
  • 31
  • 49
0
votes
1 answer

CRUD operations using Ember-Model

Here,I am trying to implement CRUD operations using ember-model. I am totally new to ember environment,actually i don't have much understanding of ember-model. Here,i am trying to add new product and delete existing one.I am using inner node of…
Sachin
  • 2,321
  • 11
  • 31
  • 49
0
votes
1 answer

Ember-Model hasMany does not save model emberjs

I am trying to achieve this Department -HasMany->Contacts. Have no clue Department gets saved but Contacts doesnt get Saved you can refer this section in jsbin App.NewcontactController = Ember.ObjectController.extend({ needs: ['department'], save:…
Rigel
  • 882
  • 1
  • 11
  • 32
0
votes
1 answer

Failed to use deleteRecord() of ember-model

Here,I am trying to delete row from table on click of row delete option (cross sign). But it is throwing an error Uncaught TypeError: Object 2 has no method 'call' Here,I am displaying data from model as follow : …
Sachin
  • 2,321
  • 11
  • 31
  • 49
0
votes
2 answers

Failed to implement computed property in emberjs

My fixture data contains multiple array.Out of this multiple array cart_items contains some product data. I am trying to calculate total no of products available in cart data (based on length of cart_items items) but i am not able to calculate no…
Sachin
  • 2,321
  • 11
  • 31
  • 49
1 2 3
8
9