2 ms·
When there are no authorities, there are no compliance issues :) The roll of controllers and link functions isn't to hold logic, it's to wire things together be
by cheriot 12y ago
When there are no authorities, there are no compliance issues :)
The roll of controllers and link functions isn't to hold logic, it's to wire things together between the scope and services/models. For example, having a userStatus.getUserCall() is a step in the right direction. Now have the service check the response code and use the user data to create a single user object that can be returned/resolved. So your controller becomes userStatus.getUserCall().then(function(user) { $scope.user = user; }) or since angular templates are promise aware, you can reduce it to $scope.user = userStatus.getUserCall(). Now the NavbarCtrl and the MenuCtrl only need to share that one line rather than ~10!