We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc65be3 commit 2323e19Copy full SHA for 2323e19
routing/generate_url_javascript.rst
@@ -26,10 +26,12 @@ variables. The ``escape()`` function helps escape any non-JavaScript-safe values
26
But if you *actually* need to generate routes in pure JavaScript, consider using
27
the `FOSJsRoutingBundle`_. It makes the following possible:
28
29
-.. code-block:: javascript
+.. code-block:: html+twig
30
31
+ <script>
32
var url = Routing.generate('blog_show', {
33
'slug': 'my-blog-post'
34
});
35
+ </script>
36
37
.. _`FOSJsRoutingBundle`: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle
0 commit comments