title: Pass variable from modal to modal
body: <p>I´m trying to get variables from modal to an other modal, this is mi modal:</p>
  
  <pre><code>   &lt;div id="contentModal" class="modal fade" &gt;
          &lt;div class="modal-content animate" tabindex="-1"&gt;
              &lt;div class="modal-container-"&gt;
                &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                  &lt;h1&gt;Issue:  {{selected_issue.Issue}}&lt;/h1&gt;
                &lt;/div&gt;
                  &lt;div class="modal-body row"&gt;
                      &lt;div class="col-md-5"&gt;
                          &lt;h5 style="text-align: center;"&gt;Descripción&lt;/h5&gt;                   
                          &lt;p1&gt;{{selected_issue.Descripcion}}&lt;/p1&gt;
                        &lt;/div&gt; 
                        &lt;div class="col-md-5"&gt;
                          &lt;h5 style="text-align: center;"&gt;Solución&lt;/h5&gt;
                         &lt;p1&gt;{{selected_issue.Solucion}}&lt;/p1&gt;
                        &lt;/div&gt;
  
  
                      &lt;div id="modalSpec"class="col-md-2"&gt;
                          &lt;h6&gt;OpCo:&lt;/h6&gt;
                          &lt;p1&gt;{{selected_issue.opCo}}&lt;/p1&gt;
                          &lt;h6&gt;Tecnologia:&lt;/h6&gt;
                          &lt;p1&gt;{{selected_issue.Tecnology}}&lt;/p1&gt;
                          &lt;h6&gt;Version:&lt;/h6&gt;
                          &lt;p1&gt;{{selected_issue.Version}}&lt;/p1&gt;
                          &lt;h6&gt;Estado:&lt;/h6&gt;
                          &lt;p1&gt;{{selected_issue.Status}}&lt;/p1&gt;
                          &lt;h6&gt;Autor:&lt;/h6&gt;
                          &lt;p1&gt;{{selected_issue.Autor}}&lt;/p1&gt;
                          &lt;p1&gt;{{id}}&lt;/p1&gt;
                          &lt;div&gt;
                            &lt;h6&gt;Editar:&lt;/h6&gt;
                            &lt;select name='type' id='type'&gt;
                            &lt;option value="" disabled selected&gt;Seleccionar&lt;/option&gt;
                            &lt;option value='OpCo' &gt;Descripción&lt;/option&gt;
                            &lt;option value='Solucion' &gt;Solución&lt;/option&gt;
                            &lt;option value='Estado' &gt;Estado&lt;/option&gt;
                            &lt;/select&gt;
                            &lt;div&gt;&lt;button id"modalClose" type="button" class="btn btn-default" data-dismiss="modal"&gt;Cerrar&lt;/button&gt;&lt;/div&gt;  
                          &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
       &lt;/div&gt;
                &lt;script&gt;
    $("#type").on("change", function () {        
        $modal = $('#secondModal');
        if($(this).val() === 'OpCo'){
          $modal.modal('show');
          $('#type').val('');
      }
   });
    &lt;/script&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>As the code shows, the script that triggers the second modal is inside the first modal.Whenever you select something from the dropdown menu, modal pops-up, but i do not know how to pass variables like for example {{selected_issue.Descripcion}}, also i would like to know how to pass the $index value from the array.</p>
  
  <p>Thanks a lot to everyone.</p>