I try to realise two theme in Angular 10 by this flow . It works only with css. I use SCSS in my project. How can I modify this example to use scss? Sorry that I don't have any code here. Code you can find it in link. Thanks for help!
You need to specify you are using SCSS on your project.
You can manually change your angular.json file like so:
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
And then change your files from CSS to SCSS, including the main styles.css referenced in the angular.json.
Change the app.component.css
file to app.component.scss
and in app.component.ts change the styleUrls
to app.component.scss
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.