The following command in Angular CLI generates a new component with 3 files - HTML, TS and SCSS.
ng g c file --skip-import --spec false
I just need the HTML and CSS. I'm already skipping the spec file.. How do I tell it to skip creating the SCSS?
Following angular command can be used in the terminal
ng g c something-component --flat -it -is --skipTests
-is for inline css, preventing style file creation>
--flat to prevent folder creation
-it for inline template, preventing html file creation
--skipTests to prevent .spec file creation
Try one of them as per your requirement
You need the option inlne styles, e.g.
ng g c file -is -spec false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With