<p dir="auto">As of today one needs to enumerate all the directives used by a given <code class="notranslate">@View</code>. This is very verbose and repetitive process, especially for simpler cases / components where one uses only standard / built-in directives.</p>
<p dir="auto">Assuming that I'm building a simple components that only consumes built-in directives I need to write:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component, Template, bootstrap} from 'angular2/angular2';
import {If} from 'angular2/angular2';

@Component({
....
})
@View({
  inline: '...',
  directives: [If]
})
class Simple {
...
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">Component</span><span class="pl-kos">,</span> <span class="pl-v">Template</span><span class="pl-kos">,</span> <span class="pl-s1">bootstrap</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/angular2'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">If</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/angular2'</span><span class="pl-kos">;</span>

@<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
...<span class="pl-kos">.</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
@<span class="pl-v">View</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c1">inline</span>: <span class="pl-s">'...'</span><span class="pl-kos">,</span>
  <span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-v">If</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">class</span> <span class="pl-v">Simple</span> <span class="pl-kos">{</span>
...
<span class="pl-kos">}</span></pre></div>
<p dir="auto">In a nutshell it means that for every directive I need to:</p>
<ul dir="auto">
<li>import it</li>
<li>reference in <code class="notranslate">directives</code></li>
</ul>
<p dir="auto">While I understand the benefits of this approach as well as technical limitations here, it is still very repetitive in practice, especially for very often (application-wide) directives (built-ins, directives used in most of the pages, etc.).</p>
<p dir="auto">Here are few ideas of how to make it easier on people:</p>
<ul dir="auto">
<li>allow omit <code class="notranslate">directives</code> and assume that all built-in directives are available</li>
<li>allow omit <code class="notranslate">directives</code> and assume that all directives specified by an app developer are available</li>
</ul>
<p dir="auto">This is not urgent / critical piece but would make things significantly easier on people.</p>
<p dir="auto">This is something that is bothering me.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  &lt;someComponent *ngfor=&quot;#video in videos&quot; [video]='video'&gt; "><pre class="notranslate"><code class="notranslate">  &lt;someComponent *ngfor="#video in videos" [video]='video'&gt; 
</code></pre></div>
<p dir="auto">I'm repeating video 3 times, and I'm creating an extra temp variable.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  &lt;someComponent *ngfor=&quot;[video] in videos&quot;&gt; "><pre class="notranslate"><code class="notranslate">  &lt;someComponent *ngfor="[video] in videos"&gt; 
</code></pre></div>
<p dir="auto">Makes much more sense to me. Is this something that is possible? Or is it a bad idea to begin with?</p>