问题描述
我今天首先通过运行create project命令创建了一个新库:
ng new situ-angular-components --createApplication=false --skipTests=true --prefix=situ --style=scss
然后我创建了库:
ng g library situ-angular-components
我希望当我运行ng g c footer
时,它将创建没有测试文件和SCSS文件的组件,但是不会:
有人知道为什么吗?
解决方法
打开您angular.json
并检查schematics/angular:component
树
应该是这样
"schematics": {
"@schematics/angular:component": {
"style": "scss","prefix": "app"
}
},