ng new ngrx-example
cd ngrx-examplepackage.json の置いてある、プロジェクトのルートディレクトリで、以下のコマンドを実行する。
ng add @ngrx/store
ng add @ngrx/schematics
ng add @ngrx/effects
ng add @ngrx/store-devtools
ng add @angular/materialcd src/app/
ng generate store state --root --statePath store --module app.module.tsfeature state, components, service を作成する
ng generate module item-control --module ./app.module.ts
cd item-control
echo "generate feature state"
ng generate store state --statePath store --module ./item-control.module.ts
ng generate feature store/item-control --reducers index.ts --module ./item-control.module.ts
echo "generate components"
ng generate container InputID
ng generate container SearchButton
ng generate container InputNum
ng generate container RegisterButton
echo "generate service"
mkdir shared
ng generate service shared/item-control
cd ../ng generate module shared --module app.module.ts
ng generate component shared/labeled-input --module ./shared/shared.module.ts --prefix shrd