2

I'm new in Angular 6, so the problem is that I've got main.min.css file, and don't know where to put it. Styles.sass, app-component.sass, or directly into component folder. Please explain me what's the difference between them, and where I should put this file.

main.min.css file was created by gulp, I'm using webpack, maybe that's a problem?

PawMaw
  • 101
  • 1
  • 9
  • while generating the angular cli project which did you choose css or sass ? – Joel Joseph Nov 16 '18 at 09:29
  • I chose sass while generating. I notced that it works perfect with css, but structure was some code – PawMaw Nov 16 '18 at 09:43
  • is the stylesheet common for all component then you can add it in root component / app component, else in the specific component you want – Joel Joseph Nov 16 '18 at 10:13
  • also be specific what you are trying to achieve ? are you trying to use this css file along your Style.sass file ? – Joel Joseph Nov 16 '18 at 10:18
  • Yeah, I changed stylesUrl to this main.min.css, instead of styles.scss. This css file have global styles for all project. – PawMaw Nov 16 '18 at 10:33
  • so you will have to change it manually in angular .json also , also if you are going to use css instead will have to rename every .sass files generated with each component to .css . check this article will help you (this one's to convert css to sass): https://stackoverflow.com/questions/40726081/angular-cli-from-css-to-scss – Joel Joseph Nov 16 '18 at 10:52
  • I'll read, thx a lot. I figured this problem out at the beggining of developement, so maybe it will be easier to rebuild angular cli, and restart dev – PawMaw Nov 16 '18 at 11:03

1 Answers1

0

Rebuild project with css, instead of sass

PawMaw
  • 101
  • 1
  • 9