Hi!
On Fri, Jan 11, 2013 at 9:41 PM, Brad McAlister
<
brad.mc...@gmail.com> wrote:
> It's all just about scope not really DRY?
DRY holds true, no matter what :-)
But yes, as Peter have said, AngularJS controllers only initialize
things on a scope, namelly:
- set up initial data on a scope
- register functions to be accessible from a template
- register event handlers ($scope.$on)
This is it, no more. In particular, no routing / dispatching should be
managed in a controller.
Then, when it comes to a "page" - in AngularJS a page visible in a
browser is composed of many partials. Some of them can be rather small
(for example, a row in ng-repeat) and it is not uncommon to have
separate controllers for those small partials.
Looking at your code example to make this discussion less "abstract".