[英]Two themes in Angular. Problem with variable in SCSS
我嘗試通過這個流程在 Angular 10 中實現兩個主題。 它僅適用於 css。 我在我的項目中使用 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.