ember.jsRelated issues-Collection of common programming errors
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
jeckyll2hide
ember.js ember-data
I have the following model:App.Service = DS.Model.extend(App.NodeMixin, {properties : DS.belongsTo(‘App.ServiceProperties’),…. });properties is an embedded property:App.Adapter.map(‘App.Service’, {…properties: {embedded: ‘always’} });Whenever I want to create a new service, I create also the properties:this.transaction = this.get(‘store’).transaction(); var entry = this.transaction.createRecord(App.Service, {}); var properties = App.ServiceProperties.createRecord(); entry.set(‘properties’, p
alalani
ruby-on-rails ember.js mongoid ember-data
I have two models in Mongoid: Teams and Players where Players is embedded_in Teams. On the front end we use Ember.js and every time I add a new Player to a team I save the parent record (ie. the Team). Every time I update the parent record on the backend in rails I call Team.find(params[:id]).update_attributes(params[:team])Now the problem is each time I call update_attributes all the embedded objects (ie the players) get recreated with new ids and saved in the team. This is unexpected since I w
Abdull
ember.js ember-data
Ember Data’s documentation discusses different events in a model instance’s lifecycle. I would expect that the didUpdate event is triggered whenever any of a model instance’s properties change. But my experiments don’t show this behavior. Here is a JS Bin example: http://jsbin.com/uziwam/9/edit In that example, you can see that I register handlers on the “ren” model instance: I register handlers (console.log(..) messages) for the didLoad and didUpdate events.When starting the code, “ren’s” didL
user1984778
jquery-ui ember.js
I need an advanced multiselect element (with search function) for my ember application.I like this jQuery-UI Multiselect widget and started with this code:// app.js … App.MultiSelectView = Em.View.extend({didInsertElement: function() {this._super();console.log(“Creating multiSelect element”);$(“#mselect”).multiselect().multiselectfilter();}, }); App.multiSelectView = App.MultiSelectView.create(); …// index.html … <script type=”text/x-handlebars” data-template-name=”mulselect”><sel
dgbonomo
ember.js
(This is a double-post of my identical question on the EmberJS Discuss forums.)When a handlebars template {{value}} is somewhere where the browser doesn’t reasonably expect plain text, such as a <table>, it seems to behave in unexpected ways. I’ve created an example page with source and included it below. Can anybody explain what is going on or why this happening, and whether or not this behavior is intentional?To clarify, I’m not looking for a quick way around this. I know how to do that
Ben
ember.js state-management
I’ve setup a State Manager for tracking user login state, based on this answer here: Change Navbar based on login stateHowever, I’d like to take it to the next step and have not only the navbar update according to the state, but the main template itself. I’ve gotten this mostly working so that when you click on the login button it will show you the ‘welcome you’re now logged in message.’ However, if you logout and try to login again, it just shows a blank screen as if it is not correctly re-re
HaoQi Li
ember.js ember-data
General question: I would like to get an overview of current transaction (currentTransaction) and default transaction (defaultTransaction).Specific question: I’ve been comparing in the Ember controller this.get(‘model’).save() and this.get(‘store’).commit().this.get(‘model’).save() will eventually call Ember-data Store’s get(this, ‘currentTransaction’).commit()., see github.this.get(‘store’).commit() will eventually call Ember-data Store’s get(this, ‘defaultTransaction’).commit(), see github.In
Wojciech Bednarski
javascript ember.js
I’m trying to call view method from controller, but no idea how to do this. From view I can easily call controller method like this.get(‘controller’).send(‘method’);How to do something like that from controller this.get(‘view’).send(‘method’);?To give you better overview what I’m trying to do.I have application controller Ember.Controller.extend({}) I have application view Ember.View.extend({}) and application template.In application template is login form, when user submit it controller method
Jarrod Nettles
ember.js url-routing client-side javascript-framework
I’m working on a new client-side only app with the latest version of Ember.js. There is a single PHP page which builds the scripts, css, template files, etc. and delivers it all into index.php. I’m using an htaccess directive so that all requests are rewritten to /index.php. The PHP is only there to conveniently package the Javascript, as far as I’m concerned.Currently, routes in the browser look like this and work just fine./#/about /#/favorites /#/etc /#/posts/5/editHowever, I would like them
Web site is in building