Can you explain the differences between implementing a $rootScope function and a service in terms of security and performance?
After reading this, I am curious.
I have been trying to determine whether a specific global function for my app should be implemented in a service or on the $rootScope. To give you some context, I am currently working on a dirty form function that prompts users when they try to leave a form without saving. I chose to make it a global function, so any advice?
Appreciate the feedback,
Jan