Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ngx-translate load from object map, key/value
import { Observable } from 'rxjs/Observable';
const translations: any = {
'stage_headline' : 'hello'
class MappedDataLoader implements TranslateLoader {
getTranslation(lang: string): Observable<any> {
return Observable.of(translations);
loader: {
provide: TranslateLoader,
useClass: MappedDataLoader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.