Closed SHTIKOV closed 4 years ago
I added option for my route and this route has been added to json, but how can I generate js routes without this option?
/**
* @Route("/login", name="login", options={"expose"=true})
*/
Exposing a route can be done either from the route definition or from the config of the bundle: https://symfony.com/doc/master/bundles/FOSJsRoutingBundle/usage.html#generating-uris
But if the route is not exposed to the JS generator, you won't be able to generate a URL for it. That's the whole point.
@stof, thank you :)
Description
I have problem in Symfony 5.0.8 with generate routes, when I run this command (
bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
) my json file generated with empty routes array.File
fos_js_routes.json
Trouble in this code
https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/blob/7dfd2165c1170a73e5929e70fb80ef57f5539869/Extractor/ExposedRoutesExtractor.php#L90
https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/blob/7dfd2165c1170a73e5929e70fb80ef57f5539869/Extractor/ExposedRoutesExtractor.php#L98
What can I do to solve this problem?