I'm implementing an Angular application, where I let the user choose the localization parameters (language, date format, number format, etc.) and after the selection the interface gets updated instantly, without having to recompile or relaunch the application. I already implemented this for the language by using the 'ngx-translate' library.
Is there any way to have the same for dates and numbers format?
An interesting idea is to override the date and the number pipes. But how could I have these pipes default to a value which is chosen at runtime by the user?
I'm using Angular 14.
Thanks,
Thomas
You can extend date and the number pipes, make them impure and track changes to localization params inside.
You can not override built-in pipes, you will have to use different names.