title: Pass an id to link_to_route inside of a bootstrap modal
body: <p>My goal is that a user has to confirm a delete operation before it's send to the controller. </p>
  
  <p>At the moment I'm triggering the modal with this link:</p>
  
  <pre><code>&lt;a href="#ModalDelete" class="open-Delete btn btn-danger" data-toggle="modal" data-id="{{ $location-&gt;id }}"&gt;Löschen&lt;/a&gt;
  </code></pre>
  
  <p>Inside of this modal i've put a input-field to test if my jquery is working and the id is successfully passed to it.</p>
  
  <pre><code>&lt;div class="modal-footer"&gt;
      &lt;a href="#Modal" class="btn" data-dismiss="modal"&gt;Nein, lieber doch nicht&lt;/a&gt;
      &lt;input id="id"&gt;&lt;/input&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
      $(document).on("click", ".open-Delete", function () {
          var myId = $(this).data('id');
          $(".modal-footer #id").val( myId );
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Now i want to pass the id to a link_to_route function or something similar inside this modal, but don't find a way to do this.</p>
  
  <p>Something like that:</p>
  
  <pre><code>{{ link_to_route('locations.destroy', 'Ja, Standort löschen', array($location-&gt;id), array('class' =&gt; 'btn btn-danger')) }}
  </code></pre>
  
  <p>Is there a possibilty to do this with the link_to_route function? How do I have to pass the data?</p>