ng_generate
Create Angular artifacts like components or services using a specified schematic. Define the artifact name, path, and app root for precise file generation, with optional settings for interactive prompts and dry runs.
Instructions
Run 'ng generate' to create a new Angular artifact (component, service, etc.)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
appRoot | Yes | The absolute path to the first folder in the 'path' property. For example, if 'path' is 'webui/src/app/modules/alerts', then 'appRoot' should be the absolute path to 'webui'. | |
name | Yes | The name of the artifact to generate | |
options | No | Additional options for the schematic | |
path | No | The path where the artifact should be created, relative to the appRoot (do not include the app folder itself). For example, if the full path is 'webui/src/app/modules/alerts' and appRoot is 'webui', then path should be 'src/app/modules/alerts'. | src/app |
schematic | Yes | The schematic to generate (e.g., component, service) |