Dynamically change of date and number pipe default format

Discussão em 'Angular' iniciado por zeroquaranta, Setembro 16, 2024.

  1. zeroquaranta

    zeroquaranta Guest

    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

    Continue reading...

Compartilhe esta Página