UNPKG

@ngneat/transloco

Version:

The internationalization (i18n) library for Angular

43 lines (42 loc) 1.69 kB
import { ChangeDetectorRef, ElementRef, EmbeddedViewRef, OnChanges, OnDestroy, OnInit, TemplateRef, Type, ViewContainerRef } from '@angular/core'; import { Subscription } from 'rxjs'; import { TranslocoService } from './transloco.service'; import { HashMap, MaybeArray, TranslocoScope } from './types'; export declare class TranslocoDirective implements OnInit, OnDestroy, OnChanges { private translocoService; private tpl; private providerScope; private providerLang; private providedLoadingTpl; private vcr; private cdr; private host; subscription: Subscription | null; view: EmbeddedViewRef<any>; private translationMemo; key: string; params: HashMap; inlineScope: string | undefined; inlineRead: string | undefined; inlineLang: string | undefined; inlineTpl: TemplateRef<any> | undefined; private currentLang; private loaderTplHandler; private initialized; private path; private langResolver; private scopeResolver; constructor(translocoService: TranslocoService, tpl: TemplateRef<{ $implicit: (key: string, params?: HashMap) => any; currentLang: string; }>, providerScope: MaybeArray<TranslocoScope>, providerLang: string | null, providedLoadingTpl: Type<any> | string, vcr: ViewContainerRef, cdr: ChangeDetectorRef, host: ElementRef); ngOnInit(): void; ngOnChanges(changes: any): void; private simpleStrategy; private structuralStrategy; protected getTranslateFn(lang: string, read: string | undefined): (key: string, params?: HashMap) => any; private getLoadingTpl; ngOnDestroy(): void; private detachLoader; private resolveScope; }