title: $Injector Error on Angular Upgrade from 1.6.6 to 6
body: <p>I did Angular upgrade from Angular.Js 1.6.6 to Angular 6 using Webpack 4:</p>
  <pre>
  
      import 'core-js/es7/reflect';
      import 'zone.js';
      import 'reflect-metadata';
      import 'rxjs';
      import { NgModule } from '@angular/core';
      import { FormsModule } from '@angular/forms';
      import { Routes, RouterModule } from '@angular/router';
      import { BrowserModule } from '@angular/platform-browser';
      import { UpgradeModule, downgradeComponent, downgradeInjectable, setAngularJSGlobal } from '@angular/upgrade/static';
      import { module } from './app.module.ajs';
      import './config/routes';
      import AppComponent from './components/app/app';
      import Application from './directives/application/application';
      import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
      console.log('NgModule');
      const appRoutes: Routes = [
      ];
      @NgModule({
        declarations: [AppComponent, Application],
        entryComponents: [AppComponent],
        imports: [
          BrowserModule,
          FormsModule,
          RouterModule.forRoot(appRoutes),
          UpgradeModule
        ]
      })
      class AppModule {
        constructor(public upgrade: UpgradeModule) {
          console.log('AppModule constructor');
        }
        ngDoBootstrap() {
          console.log('AppModule ngDoBootstrap');
        }
      }
      console.log('setAngularJSGlobal ...');
      setAngularJSGlobal(window['angular']);
      console.log('setAngularJSGlobal!!!');
      import main = require('./main');
      console.log('Before bootstrapModule module.name: ', module.name);
      platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
        console.log('Hybrid mode: Angular + Angular.Js');
        module.directive('appRoot', downgradeComponent({ component: AppComponent }));
        const upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
        console.log('bootstrapModule: ', module.name);
        main['launchAngular']();
        upgrade.bootstrap(document.body, [module.name], { strictDi: true });
      });
  
  </pre>
  <p>created custom alias, added correct paths to tsconfig, Webpack build pass &amp; produce output, but when application starts in browser, error popups in console: <a href="https://code.angularjs.org/1.6.6/docs/error/$injector/modulerr?p0=%2524%2524UpgradeModule&amp;p1=%255B%2524injector%253Amodulerr%255D%2520http%253A%252F%252Ferrors.angularjs.org%252F1.6.6%252F%2524injector%252Fmodulerr%253Fp0%253Dfront%2526p1%253D%25255B%252524injector%25253Amodulerr%25255D%252520http%25253A%25252F%25252Ferrors.angularjs.org%25252F1.6.6%25252F%252524injector%25252Fmodulerr%25253Fp0%25253DngSanitize%252526p1%25253Dq%25252520is%25252520not%25252520a%25252520function%2525250AB%25252540https%2525253A%2525252F%2525252Fcompanybook.dev%2525253A3000%2525252Fangular-upgrade%2525252Fbuild%2525252Fvendors%7Eapp.chunk.bundle.js%2525253A71149%2525253A289%2525250Af%25252540https%2525253A%2525252F%2525252Fcompanybook.dev%2525253A3000%2525252Fangular-upgrade%2525252Fbuild%2525252Fvendors%7Eapp.chunk.bundle.js%2525253A71149%2525253A217%2525250A.%2525252Fnode_modules%2525252Fangular-sanitize%2525252Fangular-sanitize.min.js%2525252F%2525253C%25252540https%2525253A%2525252F%2525252Fcompanybook.dev%2525253A3000%2525252Fangular-upgrade%2525252Fbuild%2525252Fvendors%7Eapp.chunk.bundle.js%2525253A71156%2525253A3%2525250Ainstantiate%25252540http" rel="nofollow noreferrer">ngRoute is missing or incorrect ng module components</a>
  What is not done correctly &amp; how to fix this error?</p>