Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for production failed #1

Closed
heinerlamprecht opened this issue Aug 13, 2018 · 3 comments
Closed

Build for production failed #1

heinerlamprecht opened this issue Aug 13, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@heinerlamprecht
Copy link

When build an app for production with ng build --prod, the following error is thrown:

ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'TranslateModule' was called.

Reason is the forRoot() call in the declaration of the main module.

@DenysVuika DenysVuika added the bug Something isn't working label Aug 13, 2018
@DenysVuika
Copy link
Contributor

@heinerlamprecht thanks for the feedback. I will try to fix the issue shortly.

@DenysVuika
Copy link
Contributor

@heinerlamprecht please see the new 0.5.0 version. Now should support production mode and AoT, but requires extra setup in the app module (see readme)

export function setupTranslateService(service: TranslateService) {
  return () => service.load();
}

@heinerlamprecht
Copy link
Author

@DenisVuyka I updated to 0.5.0 and everything works like a charm. Thanks for the fast response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants