- Clone
- Chackout
00-setup
- Run
yarn
- Run
yarn start
- Create app
ng new ngrx-sw --prefix ngsw --routing --style scss
- Add material
ng add @angular/material
- Set component schematic CD to "OnPush"
- Create heroes module and routed component
ng g m heroes --module app.module --route heroes
- Generate a few components and service
ng g c heroes/search-heroes-box
ng g c heroes/heroes-list
ng g c heroes/heroes-list-item
ng g s heroes/heroes
- Add dependencies
yarn add @ngrx/{store,effects,entity,store-devtools}
- Set ngrx schematics as default -
ng config cli.defaultCollection @ngrx/schematics
"@ngrx/schematics:component": {
"styleext": "scss",
"changeDetection": "OnPush"
}
- Generate root store