Closed
Description
Versions
cli v6.0.0-rc.5
Repro steps
npm install @angular/cli@next
ng new helloworld --inline-template
cd helloworld
ng g generate test
Observed behavior
Produce a component with external template.
Desired behavior
Produce a component with inline template.
Mention any other details that might be useful (optional)
I did some investigation:
ng g component test --inline-template
works- following feat(@schematics/angular): save ng new options as defaults devkit#666, default options are rightly saved in
angular.json
:
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": true
}
}
- adding other options in lowercase like
spec
works:
"schematics": {
"@schematics/angular:component": {
"spec": false
}
}
- adding other options with uppercase letters like
skipImport
doesn't work:
"schematics": {
"@schematics/angular:component": {
"skipImport": true
}
}
So I think the defaults options of angular.json
with uppercase letters are wrongly transformed/passed to the generation command.
I think it's a quick PR I can do, but I don't know where the problem happen...
Metadata
Metadata
Assignees
Labels
No labels