As an Angular developer, staying fresh with RxJS is necessary. Here's a quick rundown of 5 lesser-used observables that you may want to brush up on including Pluck, Defer, FromEvent, and more!
If you've ever wondered if there are better ways to achieve the same outcome as @hostListener, Jan-Niklas has you covered. He walks through a couple of approaches that allow for more composable code. And in the spirit of fairness, he also shows the trade offs associated with each approach, including fromEvent in RxJS.
The @hostListener decorator is handy if we just want to listen to single events and don't rely on any kind of composition. Everything that involves a certain event composition should be implemented by using one of the other approaches listed above. In general, @hostListener lacks features that are necessary when dealing with event composition.
This article is a super clean and well organized example of how and why to use reusable components. In 4 simple steps, you'll walk through the setup from templates, creation of presentation components, all the way to rendering of the content.
Reusable components allow implementing new features for every instance of the component with the minimum amount of changes to the code. If we wanted to add a new method, it would be available for every button, no matter if it’s a text or an image button.
Depending on your CI/CD situation, you may run into cases where you need to set up a proxy to your APIs. This article walks through a setup using the --proxy-config options provided by the Angular CLI.
During development, I wanted to run my app on my machine and see the changes quickly on the browser. While I ran the legacy application on a virtual machine in a computer lab, the local front end needed to access those REST APIs.
If you're getting ready to set some goals for 2020, here's a short list of tools that you might want to include in your Angular goal list. Maybe you're using a few of these already. Be sure to check out the Angular State Inspector, Bit, Akita, and more tools to supercharge your development skills.