From 248e77da6d3ff202ac662213f6130b8e17878ced Mon Sep 17 00:00:00 2001 From: Yitz Schaffer Date: Wed, 5 Feb 2020 10:42:07 -0500 Subject: [PATCH] docs(migration guide): add information about change to `prefix` (#973) --- MIGRATION_GUIDE_5_TO_6.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/MIGRATION_GUIDE_5_TO_6.md b/MIGRATION_GUIDE_5_TO_6.md index 7c48d3ad..e64b782c 100644 --- a/MIGRATION_GUIDE_5_TO_6.md +++ b/MIGRATION_GUIDE_5_TO_6.md @@ -65,8 +65,20 @@ If you don't use this loader, go directly to point 5. missingTranslationHandler: {provide: MissingTranslationHandler, useClass: CustomHandler} }) ``` + +7. If you call the new `TranslateHttpLoader`, make sure your `prefix` parameter ends in a slash. + + ```ts + new TranslateStaticLoader(http, "/custom-dir/assets/i18n", "-lang.json"); + ``` + + Is now: + + ```ts + new TranslateHttpLoader(http, "/custom-dir/assets/i18n/", "-lang.json"); + ``` -7. If you use lazy loaded modules, a new `forChild` method has been added. +8. If you use lazy loaded modules, a new `forChild` method has been added. It has the benefit to declare the pipe/directive/service for your module, but it doesn't declare a new instance of the `TranslateStore`. In this new release, the store has been added to link all instances of the service. It is used behind the scenes by the service and you don't have to use it yourself.