Skip to content

Add more description to ng generate subcommands #25571

Closed
@hydroper

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions