SyntaxFix
Write A Post
Hire A Developer
Questions
If you only need to share data between views/scopes/controllers, the easiest way is to store it in $rootScope. However, if you need a shared function, it is better to define a service to do that.