Loading Template
Using provideTranslocoLoadingTpl in a component
provideTranslocoLoadingTpl in a component@Component({
selector: 'my-comp',
templateUrl: './my-comp.component.html',
providers: [provideTranslocoLoadingTpl('<p>Loading...</p>')],
})
export class MyComponent {}Using it directly in the template:
<ng-container *transloco="let t; loadingTpl: loading">
<h1>{{ t('title') }}</h1>
</ng-container>
<ng-template #loading>
<h1>Loading...</h1>
</ng-template>Was this helpful?

