suppoted Wenn ich angular2 AoT verwenden, erhalte ich eine Fehlermeldung:angular2 AoT Fehler Funktionsaufrufe sind nicht
Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 54:17 in the original .ts file), resolving symbol COMPILER_PROVIDERS in
und in meiner Richtlinie Modul, ich habe Code wie folgt:
import { COMPILER_PROVIDERS } from '@angular/compiler';
@NgModule({
/*imports ...*/
providers: [
COMPILER_PROVIDERS,
]
})
Ich verstehe daß ich die COMPILER_PROVIDERS zu einer exportierten Funktion ändern, aber wenn ich den Quellcode von @ Winkel/Compiler überprüfen, finde ich diese:
export declare const COMPILER_PROVIDERS: Array<any | Type<any> | {
[k: string]: any;
} | any[]>;
export declare class RuntimeCompilerFactory implements CompilerFactory {
private _defaultOptions;
constructor(defaultOptions: CompilerOptions[]);
createCompiler(options?: CompilerOptions[]): Compiler;
}
Ich weiß nicht, wie die COMPILER_PROVIDERS funktioniert, und ich weiß nicht, wie Sie es in eine exportierte Funktion in meinem Modul übertragen. Ich werde es schätzen, wenn mir jemand helfen kann!
Mit dem gleichen Problem und konnte noch keine Lösung finden ... – Sebastian