title: JitCompilerFactory Angular 5
body: <p>How to use JitCompilerFactory in angular 5?</p>
  
  <p>in angular 4 '@angular/compiler' exported JitCompilerFactory</p>
  
  <p>but in angular 5 file moved to "@angular/platform-browser-dynamic/src/compiler_factory"</p>
  
  <p>this my code in Angular 4</p>
  
  <pre><code>import {CommonModule} from '@angular/common'
  import {Compiler, NgModule} from '@angular/core'
  import {JitCompilerFactory} from '@angular/compiler'
  import {DynamicComponent} from './dynamic.component'
  import {DynamicComponentModule} from './dynamic.module'
  
  export function compilerFactory() {
      return new JitCompilerFactory([{useDebug: false, useJit: true}]).createCompiler()
  }
  
  @NgModule({
      imports: [
          CommonModule,
      ],
      declarations: [
          DynamicComponent
      ],
      exports: [
          DynamicComponent
      ],
      providers: [
          DynamicComponentModule,
          {provide: Compiler, useFactory: compilerFactory}
      ],
  })
  export class DynamicModule {
  }
  </code></pre>
  
  <p>how to make this works in Angular 5?</p>