title: How to get an instance of an AngularJS Controller after it has been constructed?
body: <p>I've started to break my application down into separate files due to the size and complexity of said file, based entirely on the way that the angular-seed project has done it. </p>
  
  <p>During this re-factoring I have run into a problem with the way the original controllers were constructed. Some of them, ones that will be injected into a modal dialog are created as instances.</p>
  
  <pre><code>var firstInstanceCtrl = ['$scope', function($scope) { code... } ];
  
  var secondInstanceCtrl = ['$scope', function($scope) { code... } ]; 
  </code></pre>
  
  <p>and used in my 'main' controller this way</p>
  
  <pre><code>$scope.buttonClick = function (row) {
  
      var viewModel = {};
  
      var modalInstance = $modal.open({
          backdrop: 'static',
          windowClass: 'modal-wide',
          templateUrl: 'modalFirst.html',
          controller: firstInstanceCtrl,
          resolve: {
              viewModel: function () {
                  return viewModel;
              }
          }
      });
  
      modalInstance.result.then(function () {}, function () { });
  };
  </code></pre>
  
  <p>but, the way the controllers are registered now, I don't see a way how to get an instances e.g.</p>
  
  <pre><code>angular.module('myApp.controllers', []).
  controller('firstInstanceCtrl', [function() {
  
  }])
  .controller('secondInstanceCtrl', [function() {
  
  }]); 
  </code></pre>
  
  <p>So my question is this, "How do I get an instance of a child controller inside of my main controller?"</p>