recently I created a build of my Angular5 app in which I used ngx-bootstrap to show datepicker and modals. It was working very well before production, but after production, build seems like it lost its styling.
please check attached image...
I followed all the implementation steps again, but nothing worked.
Please help to resolve this issue. Thank you so much.
Finally, I found a solution.
I just added ngx-bootstrap CSS into angular-cli.json
angular-cli.json
"styles": [
"styles.css",
"../node_modules/ngx-bootstrap/datepicker/bs-datepicker.css"],
and it worked for me. Thanks for attention.
an other solution can solve your problem if the previous solution doesn't :
it's for : "@angular/core": "^6.0.3", "@angular/material": "^7.3.2",
first add bs-datepicker.css path to angular.json file in the style paths :
"styles": [
"styles.css",
"../node_modules/ngx-bootstrap/datepicker/bs-datepicker.css"],
if you add bs-datepicker.css and still doesn't work try to add this link to your style.css
@import "~node_modules/ngx-bootstrap/datepicker/bs-datepicker.css";
that solved the problem for me hope it helps !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With