<p dir="auto">It would be nice if <code class="notranslate">@CanActivate</code> decorator would resolve some additional bindings if provided. For instance if the check I want to do during this step depends on some service that I've created, then I could do something like:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@CanActivate((myService: MyService) =&gt; { /* here I could use `myService` that was injected */ }, {
    providers: [
        MyService
    ]
})"><pre class="notranslate">@<span class="pl-v">CanActivate</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">myService</span>: <span class="pl-v">MyService</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">/* here I could use `myService` that was injected */</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
    <span class="pl-c1">providers</span>: <span class="pl-kos">[</span>
        <span class="pl-v">MyService</span>
    <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">I am aware that there is a <code class="notranslate">ComponentInstruction</code> passed to the function, but that is not of much help if I want to use anything else beyond just that.</p>
<p dir="auto"><strong>I'm submitting a ...</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] feature request"><pre class="notranslate"><code class="notranslate">[x] feature request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
<em>Main motivation:</em> print multiple object properties by using the async pipe with <strong>1</strong> network request</p>
<p dir="auto">For array observables <code class="notranslate">myObjects$: MyObject[]</code> you can use the async pipe in the following way:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div *ngFor=&quot;let myObject of myObjects$ | async&quot;&gt;
  &lt;div&gt;{{myObject.property1}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property2}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property3}}&lt;/div&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div *ngFor="let myObject of myObjects$ | async"&gt;
  &lt;div&gt;{{myObject.property1}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property2}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property3}}&lt;/div&gt;
&lt;/div&gt;
</code></pre></div>
<p dir="auto">The code above will end in <strong>1</strong> network request.</p>
<p dir="auto">For single object observables <code class="notranslate">myObjects$: MyObject</code> you can use the async pipe in the following way:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div&gt;
  &lt;div&gt;{{(myObjects$ | async)?.property1}}&lt;/div&gt;
  &lt;div&gt;{{(myObjects$ | async)?.property2}}&lt;/div&gt;
  &lt;div&gt;{{(myObjects$ | async)?.property3}}&lt;/div&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div&gt;
  &lt;div&gt;{{(myObjects$ | async)?.property1}}&lt;/div&gt;
  &lt;div&gt;{{(myObjects$ | async)?.property2}}&lt;/div&gt;
  &lt;div&gt;{{(myObjects$ | async)?.property3}}&lt;/div&gt;
&lt;/div&gt;
</code></pre></div>
<p dir="auto">The code above will end in <strong>3</strong> network requests :(</p>
<p dir="auto">For sure you could cache the observable <code class="notranslate">.publishReplay(1).refCount()</code> (only <strong>1</strong> network request) but all together it looks odd.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Add support for a local template variable e.g.:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div *ngIf=&quot;let myObject = myObjects$ | async&quot;&gt;
  &lt;div&gt;{{myObject.property1}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property2}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property3}}&lt;/div&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div *ngIf="let myObject = myObjects$ | async"&gt;
  &lt;div&gt;{{myObject.property1}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property2}}&lt;/div&gt;
  &lt;div&gt;{{myObject.property3}}&lt;/div&gt;
&lt;/div&gt;
</code></pre></div>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Beautiful code for printing multiple object properties by using the async pipe with <strong>1</strong> network request.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Linux</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.2</li>
<li><strong>Browser:</strong> All</li>
<li><strong>Language:</strong> TypeScript 2.0.3</li>
<li><strong>Node (for AoT issues):</strong> 6.7.0</li>
</ul>