ember.jsRelated issues-Collection of common programming errors
commadelimited
ember.js ember-data
I’m working on building up unit tests for our Ember applications. The current set of tests I’m targeting are our Models. I’ve got a set of tests that work really well for Models based on Ember Data, but seem to fail when based on Ember.Object. Here are two examples:App.Person = DS.Model.extend({First: DS.attr(“string”),Last: DS.attr(“string”) });App.Person2 = Ember.Object.extend({First: null,Last: null });And the test which passes for DS.Model:it(‘has a valid attribute: First’, function() {var
ianstarz
ember.js uikeyboard collectionview
EDIT: SOLVED, was accidentally creating instead of extending the ember view. See answer below.I am creating a keyboard for a touchscreen device that does not have a native touchscreen keyboard in the browser (Google Chrome on an HP touchscreen, though correct me if I’m wrong. I’m open to an easier solution.)I’d like to split out the keyboard into separate rows to make the styling easier.keyboardView: Ember.CollectionView.create({elementId: ‘search-keyboard’,content: [[ ‘q’,’w’,’e’,’r’,’t’,’y’,’u
Martin
ember.js ember-data
I’m trying to set a default value of a property, depending on another property of the model being loaded.How do I trigger the setOthers method, after the model has loaded? The totalPoints property can change afterwards, and the user should also be able to change the others value, from the initial value set in the setOthers method.I have this User model:App.User = DS.Model.extend(# [ … ]competenceRatings: DS.attr(‘competenceRatings’) )Here’s the controller:App.UsersEditController = Ember.Object
suri
ember.js
I came across following issue while building ember from source, how can i fix this.$ bundle installFetching gem metadata from https://rubygems.org/…….Fetching gem metadata from https://rubygems.org/..Resolving dependencies…Using rake (10.1.0) Installing json (1.8.1)Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension./usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require’: cannot load such file — mkmf (LoadError)from /usr/lib
user1189762
ruby-on-rails rest backbone.js ember.js frontend
I already know that ember.js is a more heavy weight approach in contrast to backbone.js. I read a lot of articles about both.I am asking myself, which framework works easier as frontend for a rails rest backend. For backbone.js I saw different approaches to call a rest backend. For ember it seems that I have to include some more libraries like ‘data’ or ‘resources’. Why are there two libraries for this? So whats the better choice? There arent a lot of examples to connect the frontend with the ba
user510159
ember.js playframework-2.0 handlebars.js rhino precompile
I’m trying to write an SBT plugin for PlayFramework 2.1 which would precompile handlebars templates located in app/assets/templates. I will of course share this plugin when it is complete. I found this howto http://eng.netwallet.com/2012/04/25/emberhandlebars-template-precompilation-with-play/ which was a little outdated, but it was no problem adapting it for Play! 2.1.Then I tried to compile a simple template file, but SBT failed with the following:ember: processing template test[error] /…/te
jayturley
javascript ember.js ember-data
I’m using Ember v1.4.0 and Ember Data v1.0.0 beta 5. I am having trouble getting the DS.Store.filter() function to work. When I go to the #/orders route, I see my list of orders. But when I go to the route #/orders/created, the full list of orders is shown, no matter how I implement the filter function. In addition, when I edit the #/orders route and put a filter on it, it works on that route and on the #/orders/created route. Its like the model never gets changed in the child route. Any help wo
Helge Talvik Söderström
ember.js
Working hard on my Ember app here, and it’s going along fine. However, I’ve run into an issue of unexpected behaviour and I’m not sure regarding the best approach to this problem.The problem is that in a specific route, I want to render another route into another outlet. However, the other route that I render into the other outlet doesn’t retain it’s own model.If I do this:App.TestRoute = Ember.Route.extend({model: function() {return {heading: “Test”,testContent: “This is test.”}} });App.IndexRo
ptmoy2
ember.js ember-data ember-model
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 is that when Ember first enters the parent route, it calls find() to get all models, which generally triggers an Ajax call to the server. Then when Ember subsequently transitions to a child route, it first calls find(), followed by find(id). If I’m using a data layer wi
ken
ember.js
In the debugger it’s easy enough to get at the class definitions of objects I’ve created by typing in the App.ClassName.prototype. Ok not hugely interesting but still good when you’re first feeling around in the “Ember dark”. What about instances though? That’s really what I want access to. If my app has moved to the ActivitiesByDateRoute and instantiated the ActivitiesByDateController then there must be a instance of ActivitiesByDateController but what container is it stored in? I thought maybe
Web site is in building