-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Backend missing files prevents angular app from starting, when fallback should be applied #9
Comments
Thank you for info. Temporary fix for this case is to wrap init promise in a new promise and resolve both positive and negative results. |
@Merwer i've reproduced an issue. Library should behave as i18next framework. |
@Romanchuk Thanks for the quick response. I'm glad you were able to reproduce the issue, and I think your proposed solution would work out perfectly. |
@Merwer Demo app repository updated to use latest angular-i18next version |
angular-i18next v3.0.0 released |
As per the issue listed at i18next/i18next-xhr-backend#261, if a file is missing, the i18next-xhr-backend issues an error message to the callback indicating the missing files.
The system would normally continue with a graceful fallback, but due to the handling by
I18NextService
in init the app initialization is rejected.angular-i18next/src/I18NextService.ts
Lines 38 to 42 in 6e86224
When using this project in the app initialization as defined in the cookbook section of the README (https://github.com/Romanchuk/angular-i18next#initialize-i18next-before-angular-application), the
reject
prevents the angular app from initializing, and only a blank screen is presented.The text was updated successfully, but these errors were encountered: