I find that I almost always want to persist scopes across route changes, and because of this, I find that I've pretty much stopped using controllers, for anything other than forwarding everything to a service. My Controllers all end up looking something like this:
app.factory('CtrlAService', function() {
return {
scope: {},
};
});
function CtrlA($scope, CtrlAService) {
$scope.data = CtrlAService.scope;
}
That is to say, all that my controller does is bind a variable to a service variable, and other than binding a function or two - I don't use controllers for anything.
Is this approach correct, and if not, what is a better way to accomplish this?
I've made an example application here: http://jsfiddle.net/Wc22k/1/