Generates an action file that contains an enum of action types, an example action class and an exported type union of action classes.
ng generate action ActionName [options]
ng generate a ActionName [options]
Nest the actions file within a folder based on the action name
.
--flat
- Type:
boolean
- Default:
true
- Type:
Group the action file within an actions
folder.
--group
- Alias:
-g
- Type:
boolean
- Default:
false
- Alias:
Generate a spec file alongside the action file.
--spec
- Type:
boolean
- Default:
false
- Type:
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