events - emberjs should I put actions in actions hash inside controller? -


"routes , controllers handle actions must place action handlers inside actions hash. if route has method same name actions, not triggered unless inside actions hash. in case of controller, while there deprecated support triggering method directly on controller, recommended put action handling methods inside actions hash forward compatibility."

that ember documentation, sounds should put actions inside actions hash within controller, after put action inside hash, controller complains uncaught error: nothing handled event 'submit'.

//this works app.startcontroller = ember.controller.extend({     submit:function(){         alert(1);     } });  // complains uncaught error: nothing handled event 'submit'. app.startcontroller = ember.controller.extend({     actions:{         submit:function(){             alert(1);         }     } }); 

btw, using v1.0.0rc

just reference @mavilein's comment, updated ember libraries , it's working now.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -