title: How to declare enums in angularjs?
body: <p>I'd like to declare some enums that should be globally accessed from anywhere in my application, eg:</p>
  
  <pre><code>enum AIState { Asleep, Idling, Chasing, Fleeing, HavingLunch };
  </code></pre>
  
  <p>Question: where and how do I have to declare those enums withint an <code>angularjs</code> app?</p>
  
  <p>main.js:</p>
  
  <pre><code>var myApp = angular.module('myApp', []);
  myApp.config(...);
  </code></pre>
  
  <p>I later want to access them using <code>AIState.Asleep</code>, so I could pass them as a parameter and delegate my logic accordingly.</p>