Using an Angular Shared Service

An Angular shared service is a powerful tool to allow cross component communication. If you’ve used other Javascript frameworks like Backbone or Vue then you are already probably familiar with the concept of a service bus. In Angular, a shared service is what provides what is essentially a pub/sub messaging pattern. Before Typescript and the componentized approach that we see in modern Javascript libraries, the service bus could become a source of problems. This was due to the fact that you could have any number of scripts publishing and subscribing to messages, but no easy to way to find which scripts were doing it other than to do a simple search. Debugging was especially painful, at least my experience with Backbone was.
Continue reading “Using an Angular Shared Service”

Angular Interceptors

One of the great things that the new Javascript frameworks have introduced are practices that would normally be found on the server. Personally I am holding out hope for WASM and Blazor to save us from Javascript once and for all. That doesn’t mean we can’t improve our quality of life though by using what is currently on offer. Angular and its contemporary Javascript framework counterparts are light years ahead of JQuery. JQuery served its purpose for its time, but it’s time to move on, and building green field applications with it is a non-starter for me.
Continue reading “Angular Interceptors”