jsverse / transloco

🚀 😍 The internationalization (i18n) library for Angular
https://jsverse.github.io/transloco/
MIT License
2.01k stars 195 forks source link

Bug(transloco): transloco pipe does not support loadingTpl when template is provided #723

Open edmondko opened 11 months ago

edmondko commented 11 months ago

Is there an existing issue for this?

Which Transloco package(s) are the source of the bug?

Transloco

Is this a regression?

Yes

Current behavior

providers: [ provideTranslocoLoadingTpl('loading...'), ... ] loading template is not shown when provided in component/module providers when | transloco pipe is used in templates.

Expected behavior

provided loading template is shown when | transloco pipe is used in template. Before translations are loaded for lazy loaded modules components with their own scope.

Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.

https://codesandbox.io/s/ngneat-transloco-forked-543jvn?file=/src/app/lazy/lazy.component.html

Transloco Config

No response

Please provide the environment you discovered this bug in

Transloco: v5.0.0
Angular: 16.0.0
Node: 16.18.2
Package Manager: npm
OS: macos 13

Browser

No response

Additional context

No response

I would like to make a pull request for this bug

No

shaharkazaz commented 4 months ago

@edmondko The loading template is only supported when using the structural directive, I'll make it clearer in the docs.