Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default schematics options with uppercase doesn't work #10371

Closed
cyrilletuzi opened this issue Apr 17, 2018 · 4 comments · Fixed by #10586
Closed

Default schematics options with uppercase doesn't work #10371

cyrilletuzi opened this issue Apr 17, 2018 · 4 comments · Fixed by #10586

Comments

@cyrilletuzi
Copy link
Contributor

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:

"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...

@cyrilletuzi
Copy link
Contributor Author

@filipesilva @clydin Any workaround idea? I have an Angular 6 course on Wednesday, I've managed to find workarounds for all other issues remaining in CLI v6, but I don't find any solution for this one, which would be quite inconvenient.

@cyrilletuzi
Copy link
Contributor Author

cyrilletuzi commented Apr 25, 2018

@hansl @Brocco @filipesilva I know it may be a low priority on your side, but it's very inconvenient during Angular courses (external templates mean switching between a lot of files, and students are lost). And everyone relying on this previously will consider this as a regression. Can you please consider fixing this for v6? I think it's a really quick fix when you know where the options are managed. Thanks.

@cyrilletuzi
Copy link
Contributor Author

PR in #10570

Brocco added a commit to Brocco/angular-cli that referenced this issue May 1, 2018
Brocco added a commit to Brocco/angular-cli that referenced this issue May 2, 2018
hansl pushed a commit that referenced this issue May 2, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant