Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 974 Bytes

action.md

File metadata and controls

61 lines (40 loc) · 974 Bytes

Action


Overview

Generates an action file that contains an enum of action types, an example action class and an exported type union of action classes.

Command

ng generate action ActionName [options]
OR
ng generate a ActionName [options]

Options

Nest the actions file within a folder based on the action name.

  • --flat
    • Type: boolean
    • Default: true

Group the action file within an actions folder.

  • --group
    • Alias: -g
    • Type: boolean
    • Default: false

Generate a spec file alongside the action file.

  • --spec
    • Type: boolean
    • Default: false

Examples

Generate a User actions file with an associated spec file.

ng generate action User --spec

Generate a User actions file within a nested folder

ng generate action User --flat false

Generate a User actions file within a nested actions folder

ng generate action User --group