typescript - Angular - Importing module causes lambda error -


i'm writing library , got working apart integrating library actual app. lambda error cannot figure out why happening.

here error:

error in error encountered resolving symbol values statically. function calls not supported. consider replacing function or lambda reference exported function (position 194:50 in 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

and here's module throws it:

providers.ts

export const components_providers: any[] = [   breadcrumbsutils,   modalapi,   notificationsapi,   siteheaderapi ]; 

components.module.ts

import {components_providers} '../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     };   } } 

the appmodule used test lib:

import {components} '../../lib-ng';  @ngmodule({   imports: [      // throws error     components.forroot()      // importing without calling forroot throws same error     components   ],   declarations: [     appcomponent   ],   schemas: [     no_errors_schema   ],   bootstrap: [     appcomponent   ] })  export class appmodule {} 

why getting error?


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -