ng g m brewery --routing=true
ng g c brewery-search -m=brewery
ng g s brewery
ng g p brewery-filter-by-state -m=brewery
For linting we use tslint together with prettier
Pre-commit checks run after staging our changes and running git commit and before a commit is completed.
If the checks fail then the commit is not made and an error shown, while if all checks pass the commit is made as normal.
This module is imported only from the main module, as it contains singleton services that any element in the application can use. We do not want to import it in each module, as this will create additional instances.
NGRX is a group of libraries “inspired” by the Redux pattern which in turn is “inspired” by the Flux pattern. Being a little more concise, this means that redux pattern is a simplified version of the Flux pattern and NGRX is an angular/rxjs version of the redux pattern.
Motivation: Single source of truth
ng generate store AppState --root --module app.module.ts
ng config cli.defaultCollection @ngrx/schematics
lazy loading https://angular.io/guide/lazy-loading-ngmodules
This project was generated with Angular CLI version 9.0.7.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.