我创建项目的时候使用了less,为啥我创建组件的时候(ng g c ----)出来的样式文件是css,我要怎么处理?
来源:3-8 模块的划分

o__oll
2019-06-27
写回答
1回答
-
在 angular.json 中的 schematics 指定 scss 或者其它
{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "myproj": { "root": "", "sourceRoot": "src", "projectType": "application", "prefix": "app", "schematics": { "@schematics/angular:component": { "style": "scss" } } } }, "defaultProject": "myproj" }
032019-06-27
相似问题