Skip to content

Commit 7589a7d

Browse files
authored
Update README.md
1 parent 40e2a98 commit 7589a7d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,21 @@ $loader = new Psr4ClassLoader();
195195
$loader->addPrefix('Ajax\\', __DIR__.'/lib/phpmv/php-mv-ui/Ajax');
196196
$loader->register();
197197
```
198+
####Injection of the service
199+
Create 2 services in the **app/config/services.yml** file :
200+
* The first for the JsUtils instance
201+
* The second for the controller
202+
203+
```yml
204+
parameters:
205+
jquery.params:
206+
semantic: true
207+
services:
208+
jquery:
209+
class: Ajax\php\symfony\JsUtils
210+
arguments: [%jquery.params%,'@router']
211+
scope: request
212+
app.default_controller:
213+
class: AppBundle\Controller\DefaultController
214+
arguments: ['@service_container','@jquery']
215+
```

0 commit comments

Comments
 (0)