title: How to pass the values inside the div to another div in angular js
body: <p>I am trying to generate the angular material cards dynamically using ng-repeat.There are some values which i fetched from json array and displayed in the 1st div.After clicking on the first div it should go to next div and display some of the data which i fetched earlier to the 1st div.</p>
  
  <p>The html page</p>
  
  <pre><code>&lt;div class="col-md-12 padding_top_2px animate-hide" ng-repeat="data in personaldata.data.result" ng-click="showHistory(data)" ng-show="activeAction == 'get'" &gt;
              &lt;div flex-xs flex-gt-xs="100" class="padding_0px margin_top_bottom_10px" layout="row"&gt;
                  &lt;md-card class="width_100 margin_0px padding_10px" md-theme="{{ showDarkTheme ? 'dark-grey' : 'default' }}" md-theme-watch&gt;
                      &lt;div class="col-md-12 padding_0px font_16"&gt;
                          &lt;table class="width_100" cellspacing="0" cellpadding="0"&gt;
                              &lt;tr&gt;
                                  &lt;td class="width_100 float_left margin_top_2px" valign="top"&gt;
                                      &lt;div class="float_left"&gt;
                                          &lt;img src="images/rupee.png" class="listViewIcon"/&gt;
                                      &lt;/div&gt;
                                      &lt;div class="float_left margin_left_15px"&gt;
                                          &lt;div class="width_100 font_700"&gt;
                                                  {{data.STATEMENT1}}
                                          &lt;/div&gt;
                                          &lt;div class="font_size_weight"&gt;{{data.receiver_twitter_handle}}&lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div class="float_right margin_top_right_5px_15px"&gt;
                                          &lt;span class="float_left"&gt;&lt;img src="images/rupee-indian.png" class="rupee_icon_history" /&gt;&lt;/span&gt; 
                                          &lt;span class="margin_left_5px"&gt;{{data.total}}&lt;/span&gt; 
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;td class="width_100 float_left" valign="bottom"&gt;
                                      &lt;div class="timing_days_ago float_left"&gt;{{data.created_time}}&lt;/div&gt;
                                      &lt;div class="credited_right"&gt;credited to &lt;/div&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/div&gt;
                  &lt;/md-card&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>This is the first div</p>
  
  <p>2nd div html</p>
  
  <pre><code>&lt;div class="col-md-12 padding_top_2px animate-hide" ng-show="activeAction == 'success'"&gt;
              &lt;div flex-xs flex-gt-xs="100" class="padding_0px margin_top_bottom_5px" layout="row"&gt;
                  &lt;md-card class="width_100 margin_0px padding_10px" md-theme="{{ showDarkTheme ? 'dark-grey' : 'default' }}" md-theme-watch&gt;
                      &lt;div class="col-md-12 padding_0px font_16"&gt;
                          &lt;table class="width_100" cellspacing="0" cellpadding="0"&gt;
                              &lt;tr&gt;
                                  &lt;td class="width_100 float_left margin_top_5px" valign="top"&gt;
                                      &lt;div class="font_100 font_family_roboto font_size_12px"&gt;
                                          Reference ID
                                      &lt;/div&gt;
                                      &lt;div&gt;
                                          {{reference_id}}
                                      &lt;/div&gt;
                                      &lt;div class="float_right margin_right_15px margin_top_m_20px"&gt;
                                          &lt;span class="float_left"&gt; &lt;img src="images/rupee-indian.png" class="rupee_icon_history" /&gt; &lt;/span&gt; 
                                          &lt;span class="float_left margin_left_5px"&gt; {{total}} &lt;/span&gt;
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;td class="width_100 float_left margin_top_15px" valign="bottom"&gt;
                                      &lt;div&gt;
                                          &lt;div class="font_100 font_family_roboto font_size_12px"&gt;
                                              {{statement}}
                                          &lt;/div&gt;
                                          &lt;div class="margin_top_20px"&gt;
                                              &lt;span class="float_left"&gt;&lt;img src="images/twitter.png" class="listViewIcon"/&gt;&lt;/span&gt;
                                              &lt;span class="own_wallet"&gt;FINdigini&lt;/span&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/div&gt;
                  &lt;/md-card&gt;
              &lt;/div&gt;
              &lt;div flex-xs flex-gt-xs="100" class="padding_0px margin_top_bottom_5px" layout="row"&gt;
                  &lt;md-card class="width_100 margin_0px padding_10px" md-theme="{{ showDarkTheme ? 'dark-grey' : 'default' }}" md-theme-watch&gt;
                      &lt;div class="col-md-12 padding_0px font_16"&gt;
                          &lt;table class="width_100" cellspacing="0" cellpadding="0"&gt;
                              &lt;tr&gt;
                                  &lt;td class="width_100 float_left margin_top_5px" valign="top"&gt;
                                      &lt;div class="float_left font_100 font_family_roboto font_size_12px"&gt;
                                          Created to
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;td class="width_100 float_left margin_top_15px "&gt;
                                      &lt;div class="margin_left_20px"&gt;
                                          &lt;div class="float_left margin_left_20px"&gt; XXXXXXXXXXXXXXXXX345 &lt;/div&gt; 
                                          &lt;div class="float_right margin_top_right_5px_15px"&gt;
                                              &lt;span class="float_left"&gt; &lt;img src="images/rupee-indian.png" class="rupee_icon_history" /&gt; &lt;/span&gt; 
                                              &lt;span class="float_left margin_left_5px"&gt; {{total}} &lt;/span&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;td class="width_100 margin_top_15px float_left" valign="bottom"&gt;
                                      &lt;div class="margin_left_20px"&gt; 
                                          &lt;div class="margin_left_20px"&gt;{{reference_id}}&lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/div&gt;
                  &lt;/md-card&gt;
              &lt;/div&gt;
              &lt;div flex-xs flex-gt-xs="100" class="padding_0px margin_top_bottom_5px" layout="row"&gt;
                  &lt;md-card class="width_100 margin_0px padding_10px" md-theme="{{ showDarkTheme ? 'dark-grey' : 'default' }}" md-theme-watch&gt;
                      &lt;div class="col-md-12 padding_0px font_16"&gt;
                          &lt;table class="width_100" cellspacing="0" cellpadding="0"&gt;
                              &lt;tr&gt;
                                  &lt;td class="width_100 float_left margin_top_5px" valign="top"&gt;
                                      &lt;div class="float_left font_100 font_family_roboto font_size_12px"&gt;
                                          Need Help?
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;td class="width_100 float_left margin_top_padding_5px" valign="bottom"&gt;
                                      &lt;div class="float_left margin_top_right_5px_15px"&gt;
                                          &lt;span class="float_left"&gt;&lt;img src="images/info.png" class="question_phone_icon_history" /&gt;&lt;/span&gt; 
                                          &lt;span class="margin_left_20px font_400"&gt;Read FAQs&lt;/span&gt; 
                                      &lt;/div&gt;
                                      &lt;div class="float_right margin_top_right_5px_15px"&gt;
                                          &lt;span class="float_left"&gt;&lt;img src="images/call-answer.png" class="question_phone_icon_history" /&gt;&lt;/span&gt; 
                                          &lt;span class="margin_left_20px font_400"&gt;Call me back&lt;/span&gt; 
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/div&gt;
                  &lt;/md-card&gt;
              &lt;/div&gt;
  
              &lt;div class="col-md-12 padding_0px  padding_top_bottom_5px text-center"&gt;
                  &lt;div class="col-md-12 padding_0px text_align_center"&gt;
                      &lt;button class="btn1 padding_top_bottom_5px" ng-click="ShowViewHistoryPage()"&gt;BACK&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>How to pass the values to the 2nd div from 1st div but the values has to be based on which card the user is clicking.Can it be passed through onclick event?Please help...</p>