Als Anfänger in eckigen, laufe ich über ein Problem beim Versuch, meine App über angular-cli zu bauen.angular2 Build Problem useFactory mit Funktion
Danach folgt tutorial:
Mein appModule wie folgt aussieht:
...
providers: [
{ provide: HttpService, useFactory: (backend: XHRBackend, options: RequestOptions) => {
return new HttpService(backend, options); },
deps: [XHRBackend, RequestOptions]}
]
...
Wenn es Gebäude erhalte ich:
Error: 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 63:39 in the original .ts file), resolving symbol Ap
pModule in ../angular/app/src/app/app.module.ts
at positionalError (..\angular\app\node_modules\@angular\compiler-c
li\src\static_reflector.js:595:18)
Wenn ich ng serve
verwenden die App ohne Probleme funktioniert.