“Gaya Impor Angular.scss” Kode Jawaban

cara mengimpor file scss di sudut

In the new angular v6, importing sass files is a little different from the previous version.

I just needed to import like this (in a component stylesheet)

@import "~src/sass/variables";    // note: without file extension

Now everything works fine

Thanks all for the help
Ankur

Gaya Impor Angular.scss

in angular.json:
...
"styles": [
              ...
              "src/styles.scss"
            ],

and in the components.ts
...
styleUrls: ['./app.component.scss']
MitchAloha

Jawaban yang mirip dengan “Gaya Impor Angular.scss”

Pertanyaan yang mirip dengan “Gaya Impor Angular.scss”

Lebih banyak jawaban terkait untuk “Gaya Impor Angular.scss” di TypeScript

Jelajahi jawaban kode populer menurut bahasa