Getting error while loading css on angular5 with ngx-bootstrap
Refused to apply style from 'http://localhost:3000/node_modules/ngx-bootstrap/datepicker/bs-datepicker.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
i have include css only in index.html
<link href="../node_modules/ngx-bootstrap/datepicker/bs-datepicker.css" rel="stylesheet"/>
You can also add the style in your .angular-cli.json, if you're using ng-cli. Then Angular CLI will take care of adding the file to index.html for you:
{
...
"styles" : [
"../../../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../../../node_modules/ngx-bootstrap/datepicker/bs-datepicker.css",
"styles.scss",
...
],
...
}
Alternatively, if not angular-cli, then webpack can take care of this for you.
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