i have a problem in my twig view when i pass params in the ajax url path,
logically twig is executed before javascript so he didnt recognize the input value passed as parameter. Is there a solution to do this without passing the param in data ? 

```
 <script type="text/javascript" charset="UTF-8">
(function($) {

    var $projectField = $('#project-field-container');

    $projectField.on('change', function() {
        var id_project = $(this).val();
        if('' != id_project) {
            $.ajax({
                url: {{ path('project_field', {'id_project': id_project})}},
                success: function (data) {
                    var content = $('select', data.contentHTML).html();
                    $projectField.html(content).trigger('change');
                }
            });
        } else {

        }
    });
})(jQuery);

```