How to add class to Router link when active in Angular

Use the following to add an active class to a menu item or active link when you are visiting the exact page:

Getting a query parameter with Angular router

It is rather easy to read out query parameters like ?id=2030 from a URL with Angular router. Here is the snippet

Use the async pipe on an observable in Angular

I had this online/offline observable and I needed it on my component. This was the snippet I used to show things dependent on my online/offline state.

How to allow html in translation strings with ng-translate

The translation pipe is extremely useful for multilingual angular apps. But by default you cannot serve html-strings in your translations. This his how to do this.

Set ion-col column width dynamically based on window size in Ionic 5

A toolbox like Ionic makes our life as a developer a little bit more easy. This post guides you in how to get the window size dynamically in your components and to set a variable width depending on it.

Subscribe to Angular