title: Angular APP_INITIALIZER in library module generates metadata compile time error: Lambda not supported
body: <p>This is my ng library module code</p>
  
  <pre><code>   @NgModule({
        imports: [NgIdleModule.forRoot()],
        providers: [ {
          provide: APP_INITIALIZER,
          useFactory: (idleStateChangeHandlerService: IdleStateChangeHandlerService) =&gt;  () =&gt; console.log(IdleStateChangeHandlerService),
          multi: true,
          deps: [IdleStateChangeHandlerService]
        }]
      })
      export class IdleActivityModule {
        static forRoot(config: IdleActivityConfig): ModuleWithProviders {
          return {
            ngModule: IdleActivityModule,
            providers: [
              {
                provide: IdleActivityConfigInjectionToken,
                useValue: config
              }
            ]
          };
        }
      }
  </code></pre>
  
  <p>On build:</p>
  
  <pre><code>&gt; Compiling TypeScript sources through ngc ERROR:
  &gt; C:/_dev/seemis-workspace/projects/shared-modules/src/lib/idle-activity/idle-activity.module.ts:9:1:
  &gt; Error encountered in metadata generated for exported symbol
  &gt; 'IdleActivityModule':  
  &gt; C:/_dev/seemis-workspace/projects/shared-modules/src/lib/idle-activity/idle-activity.module.ts:13:17:
  &gt; Metadata collected contains an error that will be reported at runtime:
  &gt; Lambda not supported.   {"__symbolic":"error","message":"Lambda not
  &gt; supported","line":12,"character":16}
  </code></pre>
  
  <p>If I move <code>APP_INITIALIZER</code> provider into the app module instead it is fine, but I don't want the app to have to have this knowledge.</p>