title: how to write a 'double' and a 'ntimes' directive for angularjs?
body: <p>I am having trouble understand the 'ngRepeat' directive so I wish to learn how angularjs works by writing a 'double' directive and then extending with an 'ntimes' directive:
  so</p>
  
  <h2>'double'</h2>
  
  <pre><code>&lt;double&gt;
   &lt;h1&gt;Hello World&lt;/h1&gt;
  &lt;/double&gt;
  </code></pre>
  
  <p>would result in producing:</p>
  
  <pre><code> &lt;h1&gt;Hello World&lt;/h1&gt;
   &lt;h1&gt;Hello World&lt;/h1&gt;
  </code></pre>
  
  <h2>'ntimes'</h2>
  
  <pre><code>&lt;ntimes repeat=10&gt;
   &lt;h1&gt;Hello World&lt;/h1&gt;
  &lt;/ntimes&gt;
  </code></pre>
  
  <p>would result in producing:</p>
  
  <pre><code> &lt;h1&gt;Hello World&lt;/h1&gt; 
   .... 8 more times....
   &lt;h1&gt;Hello World&lt;/h1&gt; 
  </code></pre>