Last month, I explained how to use ngrxLet
to render a loading template. Earlier this year, I also covered how ngrxLet
can be a great alternative to the async
pipe. All in all, ngrxLet
is a fantastic directive that keeps improving.
For instance, we can also use it to combine multiple different Observables into one local variable as follows:
Without ngrxLet
, the equivalent code would have to use the async
pipe syntax trick covered last week:
This also works, but it’s more verbose and has the downside of using ngIf, which is present only because we need a structural directive to enable the local variable assignment micro-syntax.