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.

Subscribe to Angular