How to include an external css file using Webpack and Angular2?

前端 未结 4 992
慢半拍i
慢半拍i 2021-01-18 01:29

I am trying to add an external reference to a CSS file in Angular2 using Webpack. My css is defined as

{ test: /\\.css$/, loader: \"style-loader!css-loader\         


        
4条回答
  •  南笙
    南笙 (楼主)
    2021-01-18 02:08

    I have posted an answer for the similar question, I hope it will help with you to understand how the styles/styleUrls works in angular2. There is a piece of code I proved to append css to the application through your component.

    Load external css style into Angular 2 Component

提交回复
热议问题