Using Sass in angular 2

后端 未结 3 1048
滥情空心
滥情空心 2021-01-30 18:04

I\'m trying to setup Sass in my Angular 2 project. Basically as I understand there are two ways to create an angular 2 project

1) Using

3条回答
  •  感动是毒
    2021-01-30 18:17

    There are two main scenarios here.

    1. When creating a new Angular CLI project, use CLI command

      ng new my-angular-app --style=scss

    2. When an Angular CLI project has already been set up, use CLI command

      ng set default.styleExt scss

    In case 2, you need to manually convert existing .css files. You can use also use sass or less instead of scss

    Check out the full article here.

    Using SCSS/SASS/LESS in Angular CLI Project

提交回复
热议问题