title: How to create divs with dynamic id onclick a button in angular 6/7
body: <p>In angular 6,I need to create divs on click a button.The newly div created each time should be having different ids inside container.Here is the code below</p>
  
  <h2>app.html</h2>
  
  <pre><code>&lt;button (click)="creatediv()"&gt;Create div&lt;/button&gt;
  &lt;div  class="container"&gt;
   &lt;div id="div1"&gt;Newly div created&lt;/div&gt;
  &lt;div  id="div2"&gt;Newly div created&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <h2>app.ts</h2>
  
  <pre><code>creatediv() {
  
    }
  </code></pre>