Angular 2: Is Styleurls Relative To The Current Component?
I'm encounter some troubles to add style to my angular 2 component using styleUrls. Here is how I use it : path/main.component.ts @Component({ selector: 'app-view', styleUr
Solution 1:
Don't use styleUrls
. Simply rename the style file with scss
extension. The stylesheet will be used automatically!
Therefore, my component's files will be like this, and will work with the style:
- mycomponent.ts
- mycomponent.html
- mycomponent.scss
Post a Comment for "Angular 2: Is Styleurls Relative To The Current Component?"