Skip to content

Add more description to ng generate subcommands #25571

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

Closed
hydroper opened this issue Jul 22, 2023 · 6 comments · Fixed by #29353
Closed

Add more description to ng generate subcommands #25571

hydroper opened this issue Jul 22, 2023 · 6 comments · Fixed by #29353

Comments

@hydroper
Copy link

hydroper commented Jul 22, 2023

Which @angular/* package(s) are relevant/related to the feature request?

No response

Description

Some newcomers like me didn't know what happens when I run ng g component whatever and ng g service whatever:

The description is too vague and you get confused at first what these commands do to the file system and how they name the API item and the component selector, so can you add a little more detail to --help?

Proposed solution

Add more detail:

  • ng g component --help (<name>)
    • Generates a directory at name. The last portion of name is the selector (or API item name), adding a app- prefix by default.
  • ng g service --help (<name>)
    • Generates a service and its spec at name (not at a new directory).

Alternatives considered

N/A

@JeanMeche
Copy link
Member

Hi, could you point us to which description your are talking about ? The cli --help ?

@hydroper
Copy link
Author

@JeanMeche Yeah, updated!

@JeanMeche JeanMeche transferred this issue from angular/angular Jul 22, 2023
@JeanMeche
Copy link
Member

JeanMeche commented Jul 22, 2023

@hydroper Let me transfer this to the CLI repo 👍

@santoshyadavdev
Copy link
Contributor

Hey @alan-agius4 do we know what message we want to add, I can take this up.

@santoshyadavdev
Copy link
Contributor

Hello @JeanMeche @alan-agius4
I am getting Cannot find module '/workspaces/angular-cli/lib/packages.js' imported from /workspaces/angular-cli/.ng-dev/commit-message.mjs I see there is packages.ts file inside lib bit not js, is there any extra step which I am missing to convert this to js?

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 15, 2025
Refined and clarified the descriptions for various schematics options to improve their readability and accuracy. These changes aim to make the documentation more user-friendly and accessible for developers.

Closes angular#25571
alan-agius4 added a commit that referenced this issue Jan 15, 2025
Refined and clarified the descriptions for various schematics options to improve their readability and accuracy. These changes aim to make the documentation more user-friendly and accessible for developers.

Closes #25571
alan-agius4 added a commit that referenced this issue Jan 15, 2025
Refined and clarified the descriptions for various schematics options to improve their readability and accuracy. These changes aim to make the documentation more user-friendly and accessible for developers.

Closes #25571

(cherry picked from commit 8ba6b28)
@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 Feb 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants