title: Where to put user defined functions in Angular JS?
body: <p>In my view, I want to render:</p>
  
  <pre><code>&lt;p&gt;
    {{ say() }}
  &lt;/p&gt;
  </code></pre>
  
  <p>Where <code>say</code> is defined as such: </p>
  
  <pre><code>say = function() {
    return "Hello World";
  }
  </code></pre>
  
  <p>I can define it in my controller:</p>
  
  <pre><code>function TestCtrl($scope) {
    $scope.say = function() { ... };
  }
  </code></pre>
  
  <p>But then it's only accessible within that controller.</p>
  
  <p>If I define the function outside the Angular file structure, it renders nothing. Same if I define it in my <code>controllers.js</code> file, but outside a controller function scope.</p>
  
  <p>Where is the proper place to put my function, so I can render it in any controller? </p>