Reputation: 591
I'm migrating a project to Angular 6 and I'm trying to import my css file in styles section on angular.json:
"styles": [
"./src/styles.css",
"./node_modules/primeng/resources/primeng.min.css",
"./node_modules/primeicons/primeicons.css",
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.min.js",
"./node_modules/popper.js/dist/umd/popper.min.js",
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
]
but it doesn't work. Css are correctly imported but class are not applied, except for class in style.css. Instead, it correctly work for js imported in scripts section. Any ideas? Thanks
The folder structure is:
app --
|-- node_modules
|-- src
|.. styles.css
|-- angular.json
Upvotes: 1
Views: 920
Reputation: 659
In my angular 6 app this is how I import css files:
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/pure-css-loader/dist/css-loader.css",
"node_modules/primeng/resources/themes/omega/theme.css",
"node_modules/primeng/resources/primeng.min.css"
]
Upvotes: 1