Angular uses scss Syntax of sass, angularsassscss

Source: Internet
Author: User

Angular uses scss Syntax of sass, angularsassscss

I. symptom:

Simplified Style

 

Ii. solution:

1. Install sass using npm (if npm is not available, install sass first)

(1) npm install node-sass -- save-dev

(2) npm install sass-loader -- save-dev

2. Modify the. angular-cli.json File

Put the original:

"Defaults ":{
"StyleExt": "css ",
"Component ":{}
}

To:

"Defaults ":{
"StyleExt": "scss ",
"Component ":{}
}

There is also a default public style (all style sheets used are. scss suffixes). The table suffix is changed to. scss (correct, that is, to. scss suffix, not sass)

 

Iii. Summary:

Do not use. sass for the style sheet suffix. scss

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.