Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 1x 1x 1x 1x 1x | import {
Application,
Binding,
BindingScope,
Component,
ContextTags,
CoreBindings,
inject,
injectable,
ProviderMap,
} from '@loopback/core';
import {I18NextBindings} from './keys';
import {I18NextTranslatorProvider} from './providers/i18next';
// Configure the binding for I18NextComponent
@injectable({tags: {[ContextTags.KEY]: I18NextBindings.COMPONENT}})
export class I18NextComponent implements Component {
providers: ProviderMap;
bindings: Binding[] = [
Binding.bind(I18NextBindings.I18NEXT_TRANSLATION_FUNCTION)
.toProvider(I18NextTranslatorProvider)
.inScope(BindingScope.SINGLETON),
];
constructor(@inject(CoreBindings.APPLICATION_INSTANCE) app: Application) {}
}
|