When using isDevMode() working fine for JIT build, while failed for AOT stating
Error: Error encountered resolving symbol values statically. Calling function 'isDevMode', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function
trying to create export function like this but no luck
export function isDevModeEnabled() {
return isDevMode();
}
So I also encountered this error, and raised it as an issue here. The official response from the Angular 2 development team is that this is not a bug:
I believe this is an intended behaviour. The solution is to move isDevMode() out of the annotation. (By defining to a variable)
The official solution is:
[...] You will need to set the return value to a variable, and use the variable rather than calling the function when wiring up the NgModule.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With