title: Hybrid Angular Promise rejection
body: <p>I am trying to wire up Angular 2 with AngularJs. Would anyone know why loading external js fails, inline works just fine.</p>
  
  <p>app.module.ts:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>platformBrowserDynamic().bootstrapModule(AppModule).then(platform =&gt; {
    console.log('Bootstrapping in Hybrid mode with Andular &amp; AngularJs');
     const upgrade = platform.injector.get(UpgradeModule) as UpgradeModule;
     upgrade.bootstrap(document.body, ['ToDo']);
  })</code></pre>
  </div>
  </div>
  </p>
  
  <p>AngularJs file:
  This works:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;html&gt;
  
  &lt;head&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.2/angular.min.js"&gt;&lt;/script&gt;
  
  
  &lt;script&gt;
  
  angular.module('ToDo', [])
  .controller('todoController', ['$scope', function ($scope) {
    $scope.todos = [
      { 'title': 'Build a todo app', 'done': false }
    ]
  
    $scope.addTodo = function () {
      $scope.todos.push({ 'title': 'Build a todo app', 'done': false });
    }
    $scope.clearCompleted = function () { }
  
  }])
  
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This fails with error :</p>
  
  <p>zone.js:682 Unhandled Promise rejection: [$injector:modulerr] <a href="http://errors.angularjs.org/1.6.2/" rel="nofollow noreferrer">http://errors.angularjs.org/1.6.2/</a>$injector/modulerr?... ; Zone: 
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;html&gt;
  
  &lt;head&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.2/angular.min.js"&gt;&lt;/script&gt;
  
    &lt;script src="index.js"&gt;&lt;/script&gt;
  
  
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>'index.js' matches the content of internal script</p>