title: how to add ids dynamically on component in angular js 5?
body: <p>I was trying to fetch the data from an array and displayed in divs. but whenever I loop through, I need to add different ids to every div. can anybody give me a clue how to do that? </p>
  
  <p>here is loop looks like : </p>
  
  <pre><code>&lt;div class="container2"&gt;
     &lt;div *ngFor="let dependants of data[0].dependsOn"&gt;
  
     &lt;app-sequence-element-preview [sequenceElement]='dependants'&gt;
     &lt;/app-sequence-element-preview&gt;
  
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>for example ,here ngfor will loop through and for every array index, it will store the data in different div. so how can I add ids to that divs. </p>