Angular 4/5 – route paramMap vs params

September 2021 update

The following answer is no longer true, and the Angular team says:

There are no current plans to remove params or queryParams and there’s no benefit to advising against their use.

Obsolete answer

According to the documentation :

Two older properties are still available. They are less capable than their replacements, discouraged, and may be deprecated in a future Angular version.

params — An Observable that contains the required and optional parameters specific to the route. Use paramMap instead.

Simple and efficient !

Leave a Comment