My goal is to share data between a view and a controller, so I decided to create a service. However, when I tried to use the service in the view to set the data, it didn't work as expected. Upon further investigation, I believe the issue lies within this specific line of code:
<a .... ng-click="myService.setData('someString')">