title: Angular - Importing module causes lambda error
body: <p>I'm writing a library and I got everything working apart from integrating the library with an actual app. I get a lambda error but I cannot figure out why this is happening. </p>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 194:50 in the original .ts file), resolving symbol NgModule in //ng/lib-ng/node_modules/@angular/core/core.d.ts, resolving symbol Components in //ng/lib-ng/dist/modules/components.module.d.ts, resolving symbol Components in //ng/lib-ng/dist/modules/components.module.d.ts</p>
  </blockquote>
  
  <p>And here's the module that throws it:</p>
  
  <p><strong>providers.ts</strong></p>
  
  <pre><code>export const COMPONENTS_PROVIDERS: any[] = [
    BreadcrumbsUtils,
    ModalApi,
    NotificationsApi,
    SiteHeaderApi
  ];
  </code></pre>
  
  <p><strong>components.module.ts</strong></p>
  
  <pre><code>import {COMPONENTS_PROVIDERS} from '../components/providers';
  
  @NgModule({
    imports: [
      BreadcrumbsModule,
      CheckboxModule,
      CheckboxesModule,
      DataListModule,
      DropdownModule,
      DropdownSelectModule,
      FileUploaderModule,
      ModalModule,
      NotificationsModule,
      SearchInputModule,
      SelectModule,
      SelectMultipleModule,
      SiteFooterModule,
      SiteHeaderModule,
      SwitchModule
    ],
    exports: [
      BreadcrumbsModule,
      CheckboxModule,
      CheckboxesModule,
      DataListModule,
      DropdownModule,
      DropdownSelectModule,
      FileUploaderModule,
      ModalModule,
      NotificationsModule,
      SearchInputModule,
      SelectModule,
      SelectMultipleModule,
      SiteFooterModule,
      SiteHeaderModule,
      SwitchModule
    ]
  })
  
  export class Components {
  
    public static forRoot() {
  
      return {
        ngModule: Components,
        providers: COMPONENTS_PROVIDERS
      };
    }
  }
  </code></pre>
  
  <p>The <code>AppModule</code> that is used to test the lib:</p>
  
  <pre><code>import {Components} from '../../lib-ng';
  
  @NgModule({
    imports: [
  
      // Throws error
      Components.forRoot()
  
      // Importing it without calling forRoot throws the same error
      Components
    ],
    declarations: [
      AppComponent
    ],
    schemas: [
      NO_ERRORS_SCHEMA
    ],
    bootstrap: [
      AppComponent
    ]
  })
  
  export class AppModule {}
  </code></pre>
  
  <p>Why am I getting this error?</p>