Basic template for having fun with Angular and RXJS !
- move to the ClientApp folder
- npm install
- ng serve: if this command is not recognised try npm install @angular/cli
There is a 'Counter' Tab. In this tab you can find a counter that counts. Clicking 'Increment' adds a clock based on the counter.
- In the code there is a clock.Service.ts that provides a clock$.
- The counter component displays the clock$ from the service using | async
- Each new created clock displays the same value using | async
Log the clocks values in the console when received. (hint: tap)
The Service is supposed to be a singleton provided to all components. Why is the value not synchronised between all components ?
Make the value synchronised. (Hint: share)
Make the values of the clocks (when clicking 'increment') use show a FizzBuzz (%3 = 'Fizz', %5 = 'Buzz'). (Hint: map)
Add a new counter that will only show the clock value when a 'Refresh' button is clicked. (Hint: zip, subject)