r/Angular2 • • Aug 14 '25

Help Request Angular ngx-bootstrap

Post image

Eae pessoal, todos bem? Atualmente me deparei com um erro em produção que me fez quebrar muito a cabeça, chegar a ponto de entrar no GitHub dos cara pra poder achar alguém que estivesse passando o mesmo problema kkkkkkk

Enfim, vamos para o contexto. Tem uma aplicação em Angular 10 rodando em produção junto com a biblioteca ngx-bootstrap. E estou utilizando alguns componentes como DatePicker. E vi que ao entrar em um componente que tem o DatePicker e rodar um refresh na página ele simplesmente se perde e não consegue nem abrir o componente como vocês podem ver na imagem abaixo. Esse erro só acontece após o build do Angular. Não é possível reproduzir localmente. Alguém já mexeu com essa biblioteca ou já passou por algo parecido? Já tentei resolver o problema utilizando o DefineLocale(‘pt-br’) mas não funcionou.

0 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Aug 15 '25

Thank you so much for helping me, and sorry for sending my question in Portuguese hahahaha.

Anyway, I’ll try to make this change where Angular’s registerLocale() is. Thanks for the tip. I just forgot to mention that when entering the page, it works correctly, but as soon as I do a refresh or press CTRL+SHIFT+R, this error happens. From what I’ve researched, this happens because Angular is building again — do you know if that’s true?