News for hackers. Stuff that matters.
Re:Ask HN: Angular/Knockout/Ember, logic in templates, and m... by pixelcort on Thursday August 30, 2012 @02:29PM (#4456040)
Not sure about Angular and Knockout, but in Ember the convention is for actions to target a state manager by default. This means you can handle the action differently depending on what state you're in. You could think of it as the action being just a custom event type that a state can sign up for.

I wouldn't consider actions in the template to be logic; if the actual event handler were in the template then I'd see a concern.

I like to think about it like a cycle: the template actions are received by the states, which make changes to the models and controllers, which update the views and templates.

There are no comments on this comment yet.