C# like object initialisation in TypeScript

In TypeScript, I’ve missed the ease of initialising objects as I have in dotnet with object initalisation. While researching an issue, I stumbled upon a little trick that makes initialising an object a breeze in TypeScript.

Continue reading “C# like object initialisation in TypeScript”

Advertisements

Correctly unsubscribe in Angular

At work, a number of angular web pages were sending an increasing number of requests to the back-end. Apparently, if I reuse components that don’t properly dispose of their observable subscriptions, they keep sending and processing multiple requests.

Continue reading “Correctly unsubscribe in Angular”