Created
July 17, 2020 06:55
-
-
Save shaharkazaz/aa8d317f0c93efa4914fea7e649bcb22 to your computer and use it in GitHub Desktop.
Adding the Transloco transpiler function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FunctionalTranspiler, TRANSLOCO_TRANSPILER } from '@ngneat/transloco'; | |
import { FeatureFlagResolver } from './has-feature-flag'; | |
@NgModule({ | |
... | |
providers: [{ | |
provide: TRANSLOCO_TRANSPILER, | |
useClass: FunctionalTranspiler | |
}, | |
{ | |
provide: 'hasFeatureFlag', // ====> The function name used in the translation | |
useClass: FeatureFlagResolver | |
}], | |
}) | |
export class TranslocoRootModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment