I get the following problem when using my custom component.
Error: The error detected static character resolution values. Function calls are not supported. Consider replacing t does it work or lambda with reference to the exported function, resolving the getValue character in E: / AOT / systemjs-aot-16 62901741 / SRC /
core.ts
export function getValue( ):any{ return "";}
Cas-component.ts
import { getValue } from './core.ts'; export let compTest = getValue();
app.module.ts
import { compTest } from './cus-component'; @NgModule({ imports: [BrowserModule, FormsModule, HttpModule, RouterModule.forRoot(rootRouterConfig, { useHash: true })], declarations: [ HomeComponent,compTest ], bootstrap: [AppComponent] }) export class AppModule { }
source share