title: loop through all controllers on the angular object
body: <p>Is it possible to from the global <code>window</code> or <code>window.angular</code> object loop through all controllers/modules/factories etc. that we have created and is being bootstrapped?</p>
  
  <p>I'm thinking something like:</p>
  
  <pre><code>for(module in window.angular.modules) {
    for(ctrl in module.controllers) {
      console.log(ctrl);
    }
    for(factory in module.factories) {
      console.log(factory);
    }
    ...
  }
  </code></pre>
  
  <p>Goal: I want to auto-generate some documentation for the app we've created.</p>
  
  <p><strong>Edit:</strong>
  Note that we are not creating global objects when doing controllers. We are registring them directly on the module:</p>
  
  <pre><code>angular.module('ourApp')
    .controller('CustomerCtrl', ['$scope', function ($scope) { ... } ]);
  </code></pre>