title: Angular promise from ActivatedRoute doesn't work with Typescript await
body: <p>To access components in the current URL path, the following works in my application:</p>
  
  <pre><code>constructor(private route: ActivatedRoute) { }
  ...
  load() {
      this.route.params.subscribe((params) =&gt; {
        const id = +params['id'];
        console.log('got parameter', id);
   ... etc
  </code></pre>
  
  <p>This is the textbook case and the variable <strong>id</strong> gets set as advertised.  But I want to use the more elegant <strong>await</strong> form and it doesn't work.  (Of course I will have a string of <strong>await</strong> statements following.)  Like this:</p>
  
  <pre><code>async load() {
      try {
        console.log('getting parameters');
        const params = await this.route.params.toPromise();
        console.log('got params', params);
        const id = +params['id'];
    ... etc
  </code></pre>
  
  <p>What I get is the output from the first <strong>console.log()</strong> call but the second never comes.  And of course the <strong>id</strong> variable doesn't get set and the rest of the code never executes.</p>
  
  <p>The documentation and the working code says that <strong>this.route.params</strong> is an <strong>Observable</strong>, which should be convertable to a <strong>Promise</strong> via <strong>toPromise()</strong> and thereby used with Typescript <strong>async</strong>/<strong>await</strong>.  I use <strong>await</strong> statements with the <strong>Observables</strong> that come out of the <strong>HttpClient</strong> module just fine.</p>
  
  <p>But it doesn't work.  Anyone know why?</p>