title: Angular 4/5 - route paramMap vs params
body: <p>I am trying to get URL param in my Angular 5 app and I've found two ways of doing it: </p>
  
  <p>1) Using <code>paramMap</code></p>
  
  <pre><code>    ngOnInit() {
        this.hero$ = this.route.paramMap
          .switchMap((params: ParamMap) =&gt;
            this.service.getHero(params.get('id')));
      }
  </code></pre>
  
  <p>2) Using <code>params</code></p>
  
  <pre><code>    ngOnInit() {
        this.sub = this.route.params.subscribe(params =&gt; {
          this.id = +params['id'];
        });
      }
  </code></pre>
  
  <p>Is there any difference? Which one is the best practice?</p>