transloco
transloco copied to clipboard
Bug(translation API): it failed to get sub scope with `selectTranslation()`
Is there an existing issue for this?
- [X] I have searched the existing issues
Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
Yes
Current behavior
I have a subfolders under the path of /assests/i18n
. In the demo, the path is /assets/i18n/admin-page/sub-page
. I want to get the translation in component with selectTranslation()
, but it doesn't work. selectTranslate()
and selectTranslateObject()
work.
In my understanding, we should use selectTranslateObject()
when we want to get a part of the translation, and use selectTranslation
for the whole translation file.
Expected behavior
selectTranslation()
should work for this use case.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/ngneat-transloco-arpvtq?file=src/app/home/home.component.ts
Transloco Config
No response
Please provide the environment you discovered this bug in
Browser
No response
Additional context
Check app/home/home.component.ts
, and see the logs in console.
I would like to make a pull request for this bug
No