You can set a controller for any DOM element. If you wanted to separate concerns, just drop multiple ng-controller="whatever" on the page.
Also, if you have more than one view, you will likely end up using ngView and routing, and each of your views will have a controller defined in it's configuration.
In one of my applications I have one controller defined on the main page that handles navigation and overall features, combined with an ngView on the page that has a different controller associated with each view.
Comment
I just started playing around with angular in the last week and this is very helpful, especially number 2, 3, 4.
Replies
Point number 4 still bothers me. That one is less a matter of something to get used to. I just can't see any other nice way around it.
Perhaps one can nest controllers across each other? Sounds unlikely.
You can set a controller for any DOM element. If you wanted to separate concerns, just drop multiple ng-controller="whatever" on the page.
Also, if you have more than one view, you will likely end up using ngView and routing, and each of your views will have a controller defined in it's configuration.
In one of my applications I have one controller defined on the main page that handles navigation and overall features, combined with an ngView on the page that has a different controller associated with each view.
Make all your controllers prototypical inherited from a base controller
Can you provide an example of this?