This project was generated with Angular CLI version 17.0.1. It was created with the purpose of learning behavioral design patterns.
The blueprint for the sorting/ filtering strategy is the QuotesSortingInterface
, while the classes in quotesSortingStrategy.ts
define different sorting / filtering strategies. The QuotesService
has a method that handles the selection and application of sorting strategies which is then used in the QuotesListComponent
.
Use a BehaviorSubject
in the AuthService
to allow components to access the user status without communicating with eachother.
Add a guard for the user-space
route, as a handler in the chain for page navigation.
Create a UnsubscribeService
which implements an interface that has methods for adding / removing subscriptions. In components, we can call the service to keep track of the subsctiptions & unsubscribe from each of them once the component is destroyed.
Create interface, abstract class & concrete classes to store the theme state and be able to change it (themeState.ts
). Use the respective interface & state in the ThemeService
for exposing concrete methods to be used in the app.component.ts
.
Run git clone https://github.com/odile-ww/books-insta.git
, then npm i
.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application 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.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.