2.0.0 • Published 11 months ago
@windmillcode/wml-options v2.0.0
Changelog
- v1.0.4
- added WMLOptionsParams.restoreInitalValuesInFormArray a readyonly function that will reset the FormArray for wmloptions useful when reusing the same formArray in a WMLOptionsComponent
- v2.0.0
- user has the option to enable/disable i18n support
- to enable
// in a utils file
import enTranslations from "src/assets/i18n/en.json";
import { WMLModuleForRootParams, WMLNGXTranslateLoader} from '@windmillcode/wml-components-base'
let getI18NObj = (lang)=>{
let i18nObj ={
en:enTranslations
}[lang]
return i18nObj
}
//
WmlOptionsModule
.forChild(
new WMLModuleForRootParams({
ngxTranslateLoaderFactory:()=> new WMLNGXTranslateLoader(getI18NObj)
})
),
- to disable
WmlOptionsModule