Sunday 15 August 2010

Ember.JS A BEFORE() function for every controller action -



Ember.JS A BEFORE() function for every controller action -

is possible create sort of before() function every action within controller?

i know can init() every action, if have code want run every thing? way redundant create same init() function each action.

no, there no way run code before every action without explicitly calling yourself. @ 1 point there thought lookup actions using get(), have allowed this, never got implemented. not sure utilize case is, if need phone call functionality before every action call, phone call yourself. it'll much more readable clever hacks come with.

ember.js

No comments:

Post a Comment