Not able to use a custom theme in Angular 4

不羁岁月 提交于 2019-12-06 04:32:38
Michael Doye

You can remove the @import "custom_theme.scss" from your styles.css. Since you have added the custom_theme.scss to your angular-cli.json (or angular.json for v6+) the import is not required.

After editing the angular.json file, you will need to run ng-serve again.

as per the official docs:

If you are using the Angular CLI, support for compiling Sass to css is built-in; you only have to add a new entry to the "styles" list in angular-cli.json pointing to the theme file (e.g., unicorn-app-theme.scss).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!