Right now the details controller just exists for two reasons:
Update $scope.message on scope when $rootScope.selectedMessage changes.
Provide a resubmitMessage method on scope.
I think this should just be merged into the search controller because:
The search controller is already watching $scope.messageSelections in order to set $rootScope.selectedMessage. This intermediate step could be skipped and the selected message details could be retrieved / set here for the details view to look at directly.
Explicitly using $rootScope to pass data between controllers is not a best practice (kind of hinted at in Angular FAQ)
I know @derek63 already ran into some confusion with the two controllers on the same page, and it might just make things easier to only deal with one controller at the top level for this page.
Right now the details controller just exists for two reasons:
$scope.message
on scope when$rootScope.selectedMessage
changes.resubmitMessage
method on scope.I think this should just be merged into the search controller because: