### File

`projects/commons/src/lib/core/translates/loaders/translate-fire.loader.ts`

### Implements

`TranslateLoader`

### Index

###### Methods
Public getTranslation

### Constructor

`constructor(db: AngularFirestore)`
Defined in projects/commons/src/lib/core/translates/loaders/translate-fire.loader.ts:5
Parameters :
Name | Type | Optional
db | `AngularFirestore` | No

### Methods

Public getTranslation
`getTranslation(lang: string, prefix: string)`
Defined in projects/commons/src/lib/core/translates/loaders/translate-fire.loader.ts:8
Parameters :
Name | Type | Optional | Default value
lang | `string` | No |
prefix | `string` | No | `'translates/'`
Returns : `Observable<any>`

    import { Observable } from 'rxjs';
    import { TranslateLoader } from '@ngx-translate/core';
    import { AngularFirestore } from '@angular/fire/firestore';

    export class TranslateFireLoader implements TranslateLoader {
        constructor(private readonly db: AngularFirestore) {}

        public getTranslation(lang: string, prefix: string = 'translates/'): Observable<any> {
            return this.db.doc(`${prefix}${lang}`).valueChanges();
        }
    }

# result-matching ""

# No results matching ""