title: How to initialize controllers manually after bootstrapping angular app using angular.bootstrap?
body: <p><strong>Found solution to this question.</strong><br>
  I have a normal javascript app.I want to embed my angularjs app into it by bootstrapping manually.The problem is that "controllers with that module is not at all initialized"</p>
  
  <p><strong>index.html:</strong></p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt; &lt;title&gt;Including angular app into another&lt;/title&gt; &lt;/head&gt;
    &lt;body&gt;
      //I have normal javascript app
      &lt;div&gt;First App&lt;/div&gt;
  
      &lt;div id="secondApp"&gt;
        &lt;div class="container" ng-include="'views/main.html'" ng-controller="MainCtrl"&gt; &lt;/div&gt;
      &lt;/div&gt;
      //included all libraries required for the app
      &lt;script src="jquery.js"&gt;&lt;/script&gt;
      &lt;script src="angular.js"&gt;&lt;/script&gt;
      //main.js
      &lt;script src="scripts.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>scripts.js:</strong></p>
  
  <pre><code>angular.module('sampleApp', []);
  // in this way, i have bootstrapped the app
  angular.bootstrap(document.getElementById('secondApp'), ['sampleApp']);
  
  angular.module('sampleApp')
   .controller('MainCtrl', function($scope, $rootScope, $timeout) {
     //i have included the functionality required for my second app
   });
  </code></pre>
  
  <p>But it is not embedding angular app into first app, getting an error <strong>"Argument 'MainCtrl' is not a function, got undefined"</strong></p>
  
  <p>I don't understand, where i am doing wrong.</p>
  
  <p>Just bootstrap the whole app in <strong>index.html</strong> instead of doing this in <strong>scripts.js</strong> like this</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    angular.element(document).ready(function() {
      angular.bootstrap(document.getElementById('secondApp'), ['assetWidgetApp']);
   });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks!!!</p>