Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 929 Bytes

container.md

File metadata and controls

43 lines (27 loc) · 929 Bytes

Container


Overview

Generates a component with Store injected into its constructor. You can optionally provide the path to your reducers and your state interface.

Command

ng generate container ComponentName [options]
OR
ng generate co ComponentName [options]

General Options

Angular CLI component options.

Container Options

Provide the path to your file with an exported state interface

  • --state
    • Type: string

Provide the name of the interface exported for your state interface

  • --stateInterface
    • Type: string
    • Default: State

Examples

Generate a UsersPage container component with your reducers imported and the Store typed a custom interface named MyState.

ng generate container UsersPage --state reducers/index.ts --stateInterface MyState