title: Angular 2 show/ hide dynamically generated divs
body: <p>Based on the response I get , I will be generating the divs dynamically . for instance if my response is </p>
  
  <pre><code>Array = {response: {  
                    " para1" : "para1name", 
                     " para2" : "para2name"
                }
  }
  
  &lt;div *ngFor="let x of Array; &gt; 
  &lt;button&gt;x.para1&lt;/button&gt;
  &lt;div &gt; content for para1&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have to store all the properties from json into an array and iterate through it to display the divs. In this case I should have 2 divs  But its not working . and also when I click on the button for para1 then div for para1 should be shown n when I click on para2 div I should hide div for para1 and should show div for para2 . how this can be accomplished.</p>