Loading Template
Transloco allows you to define a loading template that will be used while the translation file is being loaded.
You can use the provideTranslocoLoadingTpl
function in lazy module providers, component providers, in the template, or even in the AppModule
/app.config.ts
to apply it globally across the app.
Using provideTranslocoLoadingTpl
in a component
provideTranslocoLoadingTpl
in a componentmy-comp.component.ts
This accepts raw HTML or a custom Angular component.
Using it directly in the template:
my-comp.component.html
This allows you to display a loading template while the translations are being fetched.
Last updated