title: i need pass a variable JavaScript to path method in symfony
body: <p>I have the next route in Symfony: </p>
  
  <pre><code> path: /BuscarCriterio/{nombre}
  </code></pre>
  
  <p>How Can i pass the Variable {nombre} with JavaScript?</p>
  
  <pre><code>var nombre=$('#form_nombre').val();
  
              var Ruta= "{{ path('BuscarporCriterio',{'nombre':I need my JS Variable Here }) }}";
  </code></pre>
  
  <p>it is necessary to know i can't use window.location because i need this route for make a call to Ajax.</p>
  
  <p>Thanks for your answer!</p>