Error Appear when i build android using ionic build android command
ngc: Error: Error encountered resolving symbol values statically. Reference to a local (non-exported) symbol ‘dictionary’. Consider exporting the symbol (position 14:8 in the original .ts file), resolving symbol TRANSLATION_PROVIDERS
My code in translation.ts file
export const TRANSLATIONS = new OpaqueToken('translations'); // all traslations const dictionary : any = { [LANG_EN_NAME]: LANG_EN_TRANS, [LANG_AR_NAME]: LANG_AR_TRANS, [LANG_FR_NAME]: LANG_FR_TRANS }; // providers export const TRANSLATION_PROVIDERS : any = [ { provide: TRANSLATIONS, useValue: dictionary}, ];
My app.module.ts code
import {TRANSLATION_PROVIDERS,TranslatePipe,TranslateService} from ‘./translate’;
@NgModule({ declarations: [ MyApp, ], imports: [ BrowserModule, IonicModule.forRoot(MyApp) ], bootstrap: [IonicApp], entryComponents: [ MyApp,
], providers: [TRANSLATION_PROVIDERS,TranslateService ] }) export class AppModule {}
any suggestions about this issue, by the way when im using ionic serve command my project work 100% with transaltion