File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <routes xmlns =" http://symfony.com/schema/routing"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd" >
5+
6+ <route id =" fos_js_routing_js" path =" /js/routing.{_format}" methods =" GET" >
7+ <default key =" _controller" >fos_js_routing.controller::indexAction</default >
8+ <default key =" _format" >js</default >
9+ <requirement key =" _format" >js|json</requirement >
10+ </route >
11+ </routes >
Original file line number Diff line number Diff line change @@ -45,15 +45,18 @@ in the ``app/AppKernel.php`` file of your project:
4545 Step 3: Register the Routes
4646---------------------------
4747
48- Load the bundle's routing definition in the application (usually in the
49- ``app/config/routing.yml `` file):
48+ Load the bundle's routing definition in the application:
5049
5150.. code-block :: yaml
5251
53- # app/config/routing.yml
52+ # Symfony 2 + 3: app/config/routing.yml
5453 fos_js_routing :
5554 resource : " @FOSJsRoutingBundle/Resources/config/routing/routing.xml"
5655
56+ # Symfony 4: config/routes/fos_js_routing.yml
57+ fos_js_routing :
58+ resource : " @FOSJsRoutingBundle/Resources/config/routing/routing-sf4.xml"
59+
5760 Step 4: Publish the Assets
5861--------------------------
5962
@@ -64,7 +67,7 @@ Execute the following command to publish the assets required by the bundle:
6467 # Symfony 2
6568 $ php app/console assets:install --symlink web
6669
67- # Symfony 3
70+ # Symfony 3 + 4
6871 $ php bin/console assets:install --symlink web
6972
7073 .. _`installation chapter` : https://getcomposer.org/doc/00-intro.md
You can’t perform that action at this time.
0 commit comments