rx Colors | Reactive X and Signals based application |
fun with router | Angular Routing |
- We talked about the concept of operators in math, strings and arrays
- We understood that RxJS operators create observables.
- We saw 4 documentation web sites that serve as reference guide for reactive operators
- We covered some simple operators
- We created an example that uses observable to convert color search keyword into a list of matching results (colors)
- We used the
map
operator to convert user input to results
- We talked about Higher Order Observables -
Observable<Observable<T>>
- We saw how to create higher order observable using the
map
operator along with a factory method.
const order1$ = interval(1000);
const order2$ = order1$.pipe(
map(i => interval(1000))
);
/*
order2$ is of type Observable<Observable<number>>
*/
- We understood why it's a bad practice to use
subscribe
insidesubscribe
, and therefore why it's important to "Flatten" the observable. - We saw 4 types of flattening operators:
mergeAll
, andmergeMap
- Merges allnexts
from all inner observablesswitchAll
, andswitchMap
- Subscribes always to the latest observableconcatAll
andconcatMap
- Subscribes to the observables one after the other sequentiallyexhaustAll
andexhaustMap
- Subscribes to observables until completion only when idle
- We understood what
rxMethod
is - we understood that it is a method that accepts 3 types of input- T
- Observable
- Signal
- We understood that it accepts a method as parameter
- We understood that the method accepts an observable and should respond to it using operators
- We saw that we can use
rxMethod
for integration between signal store and reactive services (asyncronous services) - We saw how to connect
http
with signal store
- How to use the router directives by importing the router module
- How to configure the router using
provideRouter
inapp.config
- We created a navigation bar using the
RouterLink
directive instead ofhref
- We used
RouterLinkActive
to mark the currently selected link
- We saw how to pass parameters to a routed component using the
withComponentInputBinding()
feature. - We saw how to use signals to create a component that responds to parameters change
- We saw how to use the new lazy loading feature with the
loadComponent
property