Using angular service to share data between controllers
问题 I am trying to have two different controllers communicate with each other. Controller 1 function WelcomeCtl($scope, emailService) { $scope.save=function(){ emailService.saveEmail(‘Hi’); } } WelcomeCtl.$inject = [$scope, emailService]; This controller is designed to take the text from a text field (with ng-model = ‘email’) and put the text into a service (emailService) so it can be used in the next ng-view (which is controlled by the next controller) //for testing purposes I am just putting