Ich habe eine angular-cli App und verwende Webpack. Wenn ich versuche es die Komponente spezifische CSS zu laufen funktioniert nichtAngular-cli build generierte CSS funktioniert nicht
styles.css
/* You can add global styles to this file, and also import other style files*/
@import 'http://something/v4/dist/css/bootstrap.min.css';
Komponente
@Component({
selector: 'app-carousel',
templateUrl: './carousel.component.html',
styleUrls: ['./carousel.component.css']
})
export class CarouselComponent implements OnInit {
Component CSS
.carousel-indicators { display: none; }
Winkel cli.config
"styles": [
"styles.css",
"../node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss",
"../node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-light.scss",
"../node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss"
],
Das gerenderte HTML
<style type="text/css">@import url(http://something/v4/dist/css/bootstrap.min.css);</style>
<style type="text/css">/* You can add global styles to this file, and also import other style files */
</style><style></style><style>.carousel-indicators[_ngcontent-c5] { display: none; }</style>
aber nicht zu meinem html-Element angewendet wird 'Karussell-Indikatoren' Wenn ich die carousel.component.css
importieren in die styles.css
dann funktioniert es aber es erscheint zweimal in der generierten html
Ich suche den richtigen Weg, dies zu tun
vielleicht, weil ich mische scss und css? – Theo
Ich fand die Antwort auf meine Frage hier: https://stackoverflow.com/questions/45788972/how-to-hide-ngb-carousel-indicators-and-prev-next-control – Theo