RailsCasts Pro episodes are now free!

Learn more or hide this

Patrick Aljord's Profile

GitHub User: patcito

Site: https://plus.google.com/112643613234453381402/posts

Comments by Patrick Aljord

Avatar

The AngularJS guys already answered that one: http://blog.ricodigo.com/blog/2012/10/14/announcing-the-release-of-angularjs-scaffold/#comment-686036118

Copy/pasta:

"wrt ng-click=”archive()” which is mixing html with app logic - where is the logic? it's archive is just a hook to the controller which defines the logic.

For years we've been told about unobtrusive JavaScript and what we ended up with was spaghetti code with unclear relationships between the template and event handlers.

I'm absolutely against logic in the templates, but we have to distinguish between the actual code that represents the business logic and a hook that calls a routine with the business logic."

Avatar

I've released angularjs_scaffold to help you develop your app with angularjs and rails (it generates angular's models, controllers and views) https://github.com/patcito/angularjs_scaffold