Skip to content

Add more description to ng generate subcommands #25571

Closed

Description

@hydroper

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

Activity

  1. JeanMeche commented on Jul 22, 2023

    @JeanMeche
    Member

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

  2. hydroper commented on Jul 22, 2023

    @hydroper
    Author

    @JeanMeche Yeah, updated!

  3. transferred this issue fromangular/angularon Jul 22, 2023
  4. JeanMeche commented on Jul 22, 2023

    @JeanMeche
    Member

    @hydroper Let me transfer this to the CLI repo 👍

  5. added
    help wanted
    on Oct 11, 2023
  6. santoshyadavdev commented on Dec 4, 2023

    @santoshyadavdev
    Contributor

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

  7. santoshyadavdev commented on Dec 6, 2023

    @santoshyadavdev
    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?

  8. added 2 commits that reference this issue on Jan 15, 2025
    a547fd4
    8ba6b28
  9. added a commit that references this issue on Jan 15, 2025
    50066a3
  10. angular-automatic-lock-bot commented on Feb 15, 2025

    @angular-automatic-lock-bot

    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.

  11. locked and limited conversation to collaborators on Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @schematics/angulararea: docshelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions