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:
45
45
Step 3: Register the Routes
46
46
---------------------------
47
47
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:
50
49
51
50
.. code-block :: yaml
52
51
53
- # app/config/routing.yml
52
+ # Symfony 2 + 3: app/config/routing.yml
54
53
fos_js_routing :
55
54
resource : " @FOSJsRoutingBundle/Resources/config/routing/routing.xml"
56
55
56
+ # Symfony 4: config/routes/fos_js_routing.yml
57
+ fos_js_routing :
58
+ resource : " @FOSJsRoutingBundle/Resources/config/routing/routing-sf4.xml"
59
+
57
60
Step 4: Publish the Assets
58
61
--------------------------
59
62
@@ -64,7 +67,7 @@ Execute the following command to publish the assets required by the bundle:
64
67
# Symfony 2
65
68
$ php app/console assets:install --symlink web
66
69
67
- # Symfony 3
70
+ # Symfony 3 + 4
68
71
$ php bin/console assets:install --symlink web
69
72
70
73
.. _`installation chapter` : https://getcomposer.org/doc/00-intro.md
You can’t perform that action at this time.
0 commit comments