title: angularjs function accessible in whole app
body: <p>now I have some experience dealing with angularjs I wonder often how to having <strong>global functions</strong> (commonly used in many controllers) accessibles in the  whole app.
  my problem is <em>$scope</em> is only accesible  in its controller, I can imagine a solution adding these functions to <em>$rootScope</em>, but for now I only have added variables to <em>$rootScope</em>, I don't know how to add functions and, specially, where do that.</p>