“Style importu kątowego .scss” Kod odpowiedzi

Jak zaimportować plik SCSS w Angular

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

Style importu kątowego .scss

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

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

Odpowiedzi podobne do “Style importu kątowego .scss”

Pytania podobne do “Style importu kątowego .scss”

Więcej pokrewnych odpowiedzi na “Style importu kątowego .scss” w TypeScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu