title: Passing parameters only working for html not for .ts
body: <p>currently im trying to subscribe to a special parameter like this.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public zType = [] as any;
  constructor (private zService: ZuordnungService)
  
  
  this.route.params.subscribe(params =&gt; {
        const id = params['id'];
        this.zService
        .getTypeId(id)
        .subscribe(data =&gt;  { this.zType = data; })
         
      });
      console.log(this.zType.personentypId)</code></pre>
  </div>
  </div>
  </p>
  <p>The console log gives me &quot;Undefined&quot; but i tried it also via html:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;div id="supporter"&gt;
                  Supporter: {{zType.personentypId}}
              &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>And it shows me the correct id? Why does the console.log says its undefined and html tells me its possible and the correct id.</p>