繁体   English   中英

Angular 中的两个主题。 SCSS中的变量问题

[英]Two themes in Angular. Problem with variable in SCSS

我尝试通过这个流程在 Angular 10 中实现两个主题。 它仅适用于 css。 我在我的项目中使用 SCSS。 如何修改此示例以使用 scss? 抱歉,我这里没有任何代码。 您可以在链接中找到它的代码。 感谢帮助!

您需要指定您在项目中使用 SCSS。

您可以像这样手动更改 angular.json 文件:

"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.

app.component.css文件更改为app.component.scss并在 app.component.ts 中将styleUrls更改为app.component.scss

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM