How to Import nativescript-localize Module In all Modules in App


#1

I am using nativescript-localize plugin

and I have 6 modules in app and i want to import NativeScriptLocalizeModule to every module

as when I import in appmodule it will not work
so is there any way so at one place i can include it,

i also want localize method available and imported in all component


#2

Use a SharedModule and import it there.


#3

Yes It works but For

TNSFontIconModule.forRoot({
          'mdi': 'material-design-icons.css'
        })

in
exports: [ ]

not works it give some error


#4
exports: [
        TabsModule,
        NativeScriptCommonModule,
        NativeScriptFormsModule,
        NativeScriptLocalizeModule,

        TNSFontIconModule.forRoot({
          'mdi': 'material-design-icons.css'
        })
    ],

#5

forRoot should always be present only in app module. Additionally you can just import and export TNSFontIconModule (without for root call) in shared module.


#6

Ya Its Works Thanks
Now i can have Common import for Common Module Import Required in All Module