I had a problem setting a custom Factory in TranslateModule.forRoot() using angular CLI, I think this problem is related to the following topic: https://github.com/angular/angular-cli/issues/3707
This issue can be reproduced when you use the latest angular-cli and try to "ng serve"
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 28:19 in the original .ts file), resolving symbol AppModule
amen.
here here.
+1
can confirm. 馃憤 same error
Do you use a function instead of a fat-arrow? See documentation. This is an error that appears when you try to do AoT while your code isn't compatible.
@SamVerschueren 馃憤
@SamVerschueren
yes this worked. thanks. i have taken the solution from your example here:
Cool. Glad it's resolved now!
Most helpful comment
@SamVerschueren
yes this worked. thanks. i have taken the solution from your example here:
https://github.com/SamVerschueren/ng2-translate-aot-test/blob/2b3feceee8e288ea6480eaa5bc9ab64906630887/src/app/app.module.ts