Creative. Problem solver. Perfectionist. Coder since 8 yo. Always on the run!

Observing print events


There’s an Angular application which needs a different layout for its component when the user asks for a printed version. Yes, you can plain the media queries, but they’re not enough in certain cases. That’s why I had to find a different way to archieve the goal. On print requests, the browser is emitting two events: beforeprint and afterprint. I thought that listening to those ones could be a possible solution: the application can alter its view on beforeprint, to restore the regular approach on the next afterprint.…
Read more ⟶

shareReplay is the way!


I was working with an observable stream when I realized that for the particular scenario I was dealing with a ReplaySubject would be the best choice. There was the need to obtain all emitted values on subscribe (since there were multiple observers, attaching in different moments). And that’s where shareReplay starts to shine! It’ll also help you in computing all effects once, even you subscribe to the same stream more than once.…
Read more ⟶

ngFor2Days


I’ve been the speaker for a 2 days Angular crash course. I use this framework on a daily basis, but sometimes you need to study things again and again to refresh your knowledge. So this has been a great opportunity! I walked through all points and collected them in this repository. Hope someone will find this useful too! The image on the top is coming from unsplash.com.…
Read more ⟶