Blogs

Applying markup to translations in Angular applications (the right way)

Multi-language support in Angular application can be achieved with the help of libraries such as Angular i18n, NGX Translate or Transloco. Unfortunately, these all fail to address a commonly needed feature: translated text that contains markup. Translation splitting and innerHTML binding are often used as workaround. But these approaches are far from ideal. A better approach, supporting a context specific markup syntax is outlined in this article.

Daan Scheerens - Jan 11, 2021

RxJS subscription management: when to unsubscribe (and when not)

When working with RxJS observables you will be faced with the concept of subscriptions. Although they are quite useful, they are often used incorrectly, or worse: simply ignored. A detailed explanation of their function and how to handle them in the right way is given in this article. It explains when you must unsubscribe, when it is okay not to unsubscribe and when it is wrong to unsubscribe. You will also find tips for easily keeping track of subscriptions.

Daan Scheerens - Mar 5, 2020

Explicit and type-safe Angular module configuration

Angular's architecture and build system makes it easy to create reusable modules. Reusability largely depends on the available configuration options. Since configuration is also part of the public API surface of the module, it is important to set this up in a simple and safe to use manner. In this article you will learn how to create configuration interfaces for your Angular modules that are both explicit and type-safe. The offered solution also supports more advanced usage scenarios that require dynamically constructed configurations via dependency injection.

Daan Scheerens - Jan 3, 2020

Onze eerste blog staat live!

Het heeft een tijdje geduurd, maar inmiddels is het zover: onze eerste blog staat live! Een tijd lang stond de volgende tekst op onze website: "Momenteel zijn er nog geen blogs gepubliceerd. Achter de schermen wordt er echter druk gewerkt aan onze eerste blogs. Deze zullen binnenkort worden gepubliceerd, neem dus snel nog eens een kijkje!" Om eerlijk te zijn: er werd vooral gewerkt aan de technische basis om het publiceren van blogs mogelijk te maken. Maar zoals te zien is: die horde hebben we inmiddels genomen! Dit betekent dat we onze handen nu vrij hebben om aan de slag te gaan met...

Code Foundry - Dec 31, 2019