pretenders / ployst

The ployst core repo
1 stars 0 forks source link

Move code from projects controller into projects service #88

Closed txels closed 9 years ago

txels commented 9 years ago

Turns out one of angularJS's best practices is to put more code in services and have very thin controllers. Apparently the best approach is to have directives with isolate scopes (you may have seen me add scope in directives at some point), and let those rely on services for shared ...erm... services.

This is one step into that direction, but there will be more, as I figure out the ways of the angular.

Most of this PR is just shuffling lines of code.

It will all make sense one day. I promise to write a small doc describing the guidelines behind the structure of angular code.