UnKnown Error
ianpetzer
ember.js 2014-1-12 8:20:33
I’m trying to create a generic editor page in an Ember.js app. I need to create a few TextFields to bind to attributes on a model, but I will only know at runtime what fields this model has. My controller has an field called metadata, which describes the fields for this generic editor form. I want to iterate over the contents of this metadata and build up the form directly. Essentially I’m trying to do this:{{#each row in metadata.rows}}{{#each element in row.elements}}{{element.fieldName}}: {{
Cereal Killer
jquery css ember.js 2014-1-11 21:09:26
I have two different templates in my Ember app, for the two different languages that the app supports; so the application template is just:{{outlet}}when the app is in english mode, the eng template is rendered in the outlet, viceversa the other language template is rendered instead;i have two separate css files, one for each language, that change the colors of all elements in the page; i would like to swap this css on the fly when the template changes.Can you suggest the best way for doing this
jefflab
ember.js 2014-1-5 7:06:21
What is the ember.js community recommendation for reporting Ember app crashes? I’m looking for the equivalent of the exception_notifier gem in Rails so that I can be notified if users are experiencing errors.This Stack Overflow post recommends generic javascript error handling solutions including:Handle window.onerror yourself Use a hosted service that handles window.onerror for you like Airbrake.io or MusculaI’m hoping there is some kind of Mixin that gives you all this error handling code, an
josemota
unit-testing ember.js 2014-1-3 14:07:22
Given Ember reached 1.0.0 recently, I wanted to start using it with tests. I’m using Yeoman 1.0 with Karma. I want to unit test models but I’m finding it very difficult to accomplish isolation.The example I have now is:describe(“Expense”, function() {return it(“has a computed property called `explained`”, function() {var expense = App.Expense.create({name: “My first expense”,value: 34});return expect(expense.get(“explained”)).to.equal(“My first expense — 34”);}); });As of 1.0.0, I get the follo
user661905
javascript ember.js 2014-1-3 10:01:44
I have a small application where I’m getting translations json for a locale and updating Ember.STRINGS. Am I doing something wrong? $.get(“http://localhost:8000/translations.json”, {locale : locale}, function (data) {Ember.set(‘STRINGS’, data) ; });In 0.9.5 I was doing Ember.STRINGS = data; and it seemed to work. When I changed it to 1.0.0 a lot of things started crashing around. Both of these don’t work. Ember.STRINGS = data ; Ember.set(‘STRINGS’, data) ;
teresko
javascript ember.js 2013-12-31 21:45:59
Using Ember js, I’ve got a tree-based structure of views, each of which has a text box. Entering text in any of the boxes and hitting ‘enter’ should add a ‘reply’ to that view; that is, add another view, indented via <ul>, underneath the original view.Problem is, when I hit ‘enter’, ember just crashes with an error at line 1 of the ember.js script. Any ideas what the problem could be?JS Fiddle here: http://jsfiddle.net/TcgJB/1/
josepjaume
ember.js ember-data 2013-12-30 7:28:26
I have two models:App.User = DS.Model.create({comments: DS.hasMany(‘App.Comment’) });App.Comment = DS.Model.create({user: DS.belongsTo(‘App.User’) });When a user is deleted, it also will delete all its comments on the backend, so I should delete them from the client-side identity map. I’m listing all the comments on the system from another place, so after deleting a user it would just crash.Is there any way to specify this kind of dependency on the association? Thanks!
hellosmithy
ember.js 2013-12-29 8:17:33
What’s the best practice regarding managing different types of state? For example I have an app where some state makes sense to be tied to a route so I’m using the router, but other states can’t be reflected in the URL and it wouldn’t make sense to do so. Is it ok then to have some state managed by the full router and other state managed by an instance of state manager? Is it acceptable to have multiple state managers or is that a bad idea?
Passionate Developer
javascript ruby-on-rails ember.js haml 2013-12-28 9:00:28
I’m trying to use HAML with Handlebars and things does not seem to be working properly creating errors like below:Assertion failed: Expected hash or Mixin instance, got [object Function] Below is my view:%br%h2 Replies%table{:class => “table table-striped”}%thead%tr%th Id%th Description%th User%th Actions%tbody- @ticket.note.each do |note|%tr%td= note.id%td= note.description%td= note.user.name/ %td= link_to ‘Edit’, edit_note_path(note), :class => “btn btn-small” %td <script type=”text/x
Undo
javascript web angularjs ember.js discourse 2013-12-23 3:40:18
Yesterday, I went to http://try.discourse.org, the new project developed by the Stack Overflow team. This project uses the EmberJs javascript Framework for requesting the content. And unfortunately my browser (Safari) sees the following error in the code:TypeError: ‘undefined’ is not an object (evaluating ‘PreloadStore.get(“siteSettings”).top_menu’)The consequence of this error is that no content is displayed; I have a blank page. The javascript error logically prevents the content from displayi
josepjaume
ember.js ember-data 2013-12-30 7:28:26
I have two models:App.User = DS.Model.create({comments: DS.hasMany(‘App.Comment’) });App.Comment = DS.Model.create({user: DS.belongsTo(‘App.User’) });When a user is deleted, it also will delete all its comments on the backend, so I should delete them from the client-side identity map. I’m listing all the comments on the system from another place, so after deleting a user it would just crash.Is there any way to specify this kind of dependency on the association? Thanks!
ChrisCCC
javascript ember.js ember-data 2013-12-3 22:29:44
This is for Ember 1.0.0-rc.6I’m having some problems with EmberJS models and help would be appreciated. We create a search model instance populated with our search values and POST it to a web service, an external worker picks up the search and performs the backend call and updates it with the results embedded as detailed below. When I call reload on the object, I receive the following console output, with state transition logging enabled:Transitioned into ‘notebook.entry.occurrenceCriteria.new
Zen Savona
javascript json rest ember.js ember-data 2013-11-16 11:54:47
I’m new to Ember and getting this massive and somewhat cryptic error when moving from the Fixture Adaptor to the REST Adaptor. No other code changes were made other than commenting out my fixture data.my code:App = Ember.Application.create();// App.ApplicationAdapter = DS.FixtureAdapter.extend();App.ApplicationAdapter = DS.RESTAdapter.extend({host: ‘http://192.168.1.193:8080’,namespace: ‘/serviceprovidersservice/rest’ });App.Router.map(function() {this.resource(“service_providers”, function() {t
Nikita
javascript ajax ember.js ember-data 2013-11-15 12:42:20
folks! Any examples of using ember-data to store data getted from remote server with cross-domain ajax request? Now I have this, but…TravelClient.Tour = Ember.Object.extend({ });TravelClient.Tour.reopenClass({allTours: [],find: function(){$.ajax({url: ‘http://someIP:somePORT/tours.json’,dataType: ‘jsonp’,context: this,success: function(data){data.forEach(function(tour){this.allTours.addObject(TravelClient.Tour.create(tour))}, this)}})return this.allTours;} });UPDATE: Now i’m doing it in this w
Ivan dal Bosco
model store ember-data route 2013-11-15 11:54:11
I have a simple application which must display a list of JSON objects Data properly. After I navigate to the index page and I click on link “Risk types” I come up with the following set of errors (from the Chrome Ember inspector):DEPRECATION: Action handlers contained in an events object are deprecated in favor of putting them in an actions object (error on )Error while loading routeUncaught #ObjectI suspect the error originates from my store definition. When I define modified the route’s model
user2625690
ember.js ember-data 2013-11-14 9:31:39
I have collected data from fixture and displayed in form of table.Also,i have added two column one is edit another is delete now i want to edit specific row. On click of edit i have populated data on modal window with one update button and i want to update changes on click of update.Here is my code : Store :Grid.Store = DS.Store.extend({adapter: ‘DS.FixtureAdapter’});Router:Grid.Router.map(function () {this.resource(‘mainview’, { path: ‘/’ }); }); Grid.MainviewRoute = Embe
user2625690
ember.js ember-data 2013-11-14 8:55:27
I am new to emberjs and making one simple CRUD application. I am using ember data and localstorage-adapter to save record in local storage of browser.I am trying to update record using localstorage-adapter but it is throwing error.I have listed my code here : updatecontact: function(){//save data in local storagevar fname = this.obj_form_edit_data.get(‘cont_data.fname’);var lname = this.get(‘cont_data.lname’);var email = this.get(‘cont_data.email’);var contactno = this.get(‘cont_data.contactno’)
Giorgia Sambrotta
ember.js ember-data 2013-11-14 2:30:37
I’m try to add a new note in my application. I have “new” button in the index template and the actions: createNote in my Notes.NotesController but every time i press the button I get: Uncaught Error: Nothing handled the event ‘createNote’.here my html[…] <script type=”text/x-handlebars” data-template-name=”index”> <div class=”wrap”><div class=”bar”><input type=”text” class=”search” /><div class=”bar-buttons”><button {{action “createNote”}}> NEW </butto
Cully Mason
javascript ember.js ember-data 2013-11-14 1:45:31
I recently went from ember rc8 to 1.0.0 and to ember-data beta-2. When I did this, there were several error messages but this one I cannot figure out: Uncaught Error: Cannot perform operations on a Metamorph that is not in the DOM.I am currently in the process of getting into a jsbin to debug but in the meantime I created this album to demonstrate what is going on : AlbumHere is the Route when the error is displayed: App.BadgeBasicRoute = Ember.Route.extend({ model: function(params) {return th
avitevet
ruby-on-rails-3.2 ember.js cancan handlebars.js ember-data 2013-11-13 22:17:55
javascript/coffeescript/ember.js/stackoverflow newbie here!I’m trying to create an if-like helper that will display content only when the action on an object is authorized from the server. Basically I want the can? method from the rails cancan gem. I want to write the template something like this:<h1>Viewing profile for {{email}}</h1> <h2>Scores</h2> {{#each score in scores}}<div class=”summary”>{{score.what}} {{#can score action=destroy}}<a href=”#” id=”destr
sly7_7
ember.js ember-old-router 2013-11-12 15:35:43
I’m trying to use an already instantiated controller in my ember route.Is it not normal to ever have instantiated a controller and want to use that in a route? I know that if I the application instantiate a controller for me, I can then to router.get(“myController”) but that won’t access one that I had instantiated myself. How do I get the piece of code at the bottom of my router to work?HTML<script type=”text/x-handlebars” data-template-name=”application”>{{outlet}}</script><sc
Alexander Hauer
ember.js ember-old-router 2013-11-11 15:11:03
I have the following problem with ember.I have a table with a set of datas. I have an event that returns me the current element of the table. Then it opens another view by transitioning into a new state and writes the selected table data in a textfield.click: function(e) {var element = $(e.target).closest(“td”);App.tee = element.text().trim();var router;router = this.get(‘controller.target.router’);router.transitionTo(‘newRoute’)As you can see I have some other routes in my router as well. The
sly7_7
javascript asp.net-web-api ember.js ember-data ember-old-router 2013-11-10 15:08:03
I’m currently trying to put something together with ember + emberdata + router + asp.net web api. Most of it seem to work, however I stuck in an error message I get when ember-data tries to findAll through the adapter for my models.In my backend I have a model like this (C#):public class Genre {[Key]public int Id { get; set; }[Required][StringLength(50, MinimumLength=3)]public string Name { get; set; } }Which in my app I represent it like this using ember-data:App.Genre = DS.Model.extend({id: DS
sly7_7
ember.js ember-old-router 2013-11-10 10:56:08
I have a nested route structure that allows for pagination / sorting / searching that will essentially tweak the ArrayController in some way. The problem I have with the current implementation is that everything is required to get a valid page to render.http://localhost:8000/#/page/1/sort/username/search/daveIf I only pass the page I get the errorUncaught Error: assertion failed: Could not find state for pathAm I missing something in the nested routes or do I need to mark sort/search as optional
sly7_7
javascript coffeescript ember.js ember-old-router 2013-11-7 12:26:29
I’m trying to understand emeber.js routing. I’m not really sure, why this is not valid definition of routerPlatby.Router = Ember.Router.extend location: ‘hash’ enableLogging : trueroot: Ember.Route.extendindex: Ember.Route.extendroute: ‘/’initialState: ‘batches’enter: (router) -> console.log ‘root.index’batches: Ember.Route.extendinitialState: ‘index’route: ‘/batches’enter: (router) -> console.log ‘root.index.batches’index: Ember.Route.extendroute: ‘/’enter: (router) -> console.log
sly7_7
ember.js ember-old-router 2013-11-3 15:10:54
Anyone have any ideas why I’m getting this error:Uncaught TypeError: Cannot redefine property: __ember1346884664897 when calling:App.get(‘router’).send(‘tags’)I’m making the call from one of my views, the router is in the correct state, and as far as I can tell I’m doing everything by the book.Would really appreciate any ideas…Created a gist that might help explain things a little better. https://gist.github.com/3647288
Yehuda Katz
ember.js ember-data ember-old-router 2013-11-3 4:23:34
I get this assertion when run the code below:Emptying a view in the inBuffer state is not allowed and should nothappen under normal circumstances. Most likely there is a bug in yourapplication. This may be due to excessive property changenotifications.Link to demo: http://plnkr.co/edit/s3bUw4JFrJvsL690QUMivar App = Ember.Application.create({Store: DS.Store.extend({revision: 4,adapter: DS.FixtureAdapter.create()}),Router: Ember.Router.extend({root: Ember.Route.extend({index: Ember.Route.extend({r
sly7_7
ember.js ember-old-router 2013-10-21 18:49:06
I have a fairly large example but the issue is that when I transition to the pagination route the first time -all is good. But if I try to click on another (kicking off the pagination event) I get the error belowI don’t have a jsfiddle because this is using ember-data and the objects are databound to my REST endpoint.The ember version is pre 1.0 using the latest ember-data + handlebars-1.0.0.beta.6 and jQuery 1.7.2Uncaught Error: could not respond to eventpaginateUsers in state root.paginated.H
sly7_7
ember.js ember-old-router 2013-10-19 7:14:51
Regarding the new Ember.js routing system (described here), if I understand correctly, views are destroyed when you exit a route. Is there any way to bypass destruction of views upon exiting a route, so that the state of the view is preserved when the user re-enters the route?Update: Looks like, views are not destroyed unless the outlet view is being replaced in the new route. For e.g., if you are in stateA with ViewA in some {{outlet master}} and you go to stateB with ViewB in {{outlet master}}
sly7_7
ember.js nesting ember-old-router 2013-10-18 16:51:07
I have the following code. (I’ll just copy the router, since the application has arround 500 lines at the moment) What I need, is to switch from state ‘rooms’ to ‘guests.new’.When i get to rooms state, it loads a template where i call the action ‘newGuest’ in order to change the state to the ‘newGuest’ screen. But i can’t get it to work. On firebug I get this error:g[a] is undefinedHere’s the router code. Hope you can help me.App.Router = Ember.Router.extend({enableLogging:true,location:’hash’,g