Skip to content

Commit 7b49bbd

Browse files
authored
feat: add possibility of override getTranslateFn (#492)
1 parent 3650240 commit 7b49bbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/ngneat/transloco/src/lib/transloco.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class TranslocoDirective implements OnInit, OnDestroy, OnChanges {
121121
}
122122
}
123123

124-
private getTranslateFn(lang: string, read: string | undefined): (key: string, params?: HashMap) => any {
124+
protected getTranslateFn(lang: string, read: string | undefined): (key: string, params?: HashMap) => any {
125125
return (key: string, params: HashMap) => {
126126
const withRead = read ? `${read}.${key}` : key;
127127
const withParams = params ? `${withRead}${JSON.stringify(params)}` : withRead;

0 commit comments

Comments
 (0)