{"id":19136913,"url":"https://github.com/xactsystems/js-routing-bundle","last_synced_at":"2026-01-31T09:33:28.619Z","repository":{"id":47314082,"uuid":"260112079","full_name":"XactSystems/js-routing-bundle","owner":"XactSystems","description":"A JS routing bundle for Symfony 4+ using webpack. Derived from the FOS JSRoutingBundle. See 3.4 branch for Symfony 3.4.","archived":false,"fork":false,"pushed_at":"2024-09-25T15:51:53.000Z","size":78,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-09T20:59:33.337Z","etag":null,"topics":["hacktoberfest","routing","symfony","webpack"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XactSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-30T04:19:39.000Z","updated_at":"2021-10-29T17:41:11.000Z","dependencies_parsed_at":"2022-07-21T01:32:39.370Z","dependency_job_id":null,"html_url":"https://github.com/XactSystems/js-routing-bundle","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XactSystems%2Fjs-routing-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XactSystems%2Fjs-routing-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XactSystems%2Fjs-routing-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XactSystems%2Fjs-routing-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XactSystems","download_url":"https://codeload.github.com/XactSystems/js-routing-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232340084,"owners_count":18508089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","routing","symfony","webpack"],"created_at":"2024-11-09T06:35:50.221Z","updated_at":"2026-01-31T09:33:28.580Z","avatar_url":"https://github.com/XactSystems.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"XactJSRoutingBundle\n===============\n\nThis bundle allows you to expose your Symfony routes and use them in your webpack managed JavaScript code.\nIt allows you to easily integrate the functionality of the FOSJsRoutingBundle into webpack modules.\n\nDocumentation\n-------------\n### 1) Add JSRoutingBundle to your project\n\n```bash\ncomposer require xactsystems/js-routing-bundle\n```\nFor Symfony 3.4 use:\n```bash\ncomposer require xactsystems/js-routing-bundle:^3.4\n```\n\n### 2) Include the routing template in your base Twig template\n```twig\n// templates/base.html.twig\n\n{{ include(\"@XactJSRouting/js-routing.html.twig\") }}\n```\n\n### 3) Include the JS module in your App.js\n```javascript\n// assets/js/App.js\n\n// Import the JS routing scripts\nimport '../../vendor/xactsystems/js-routing-bundle/assets/js-routing.js';\n```\nThe actual path to the js-routing.js file may not be exactly as shown, you may need to adjust this for your own project.\n\n### 4) Using the routing class, exactly as you would with FOS bundle\n```javascript\n// Get the URL of your routes\nlet url1 = Routing.generate('home');\nlet url2 = Routing.generate('some-other-route', {id: myLocalId, state: myLocalState});\n```\n### 5) For Symfony 3.4, if you are not using Flex and ENV you may need to add the following:\n```php\n// app/AppKernel.php\n\n    public function registerBundles()\n    {\n        // You many need to do this to get the render(controller()) Twig method working for XactJSRoutingBundle\n        $_ENV[\"APP_ENV\"] = $this-\u003egetEnvironment();\n```\nAnd for the Symfony Serializer component:\n```yaml\n// app/config/config.yml\n\nframework:\n    ...\n    # If you haven't already enabled the Symfony Serializer\n    serializer: { enabled: true }\n```\n\nCredits\n-------\n\n* Ian Foulds as the creator of this package.\n* William DURAND as author of the FOS bundle.\n* Julien MUETTON (Carpe Hora) for the inspiration.\n\nLicense\n-------\n\nThis bundle is released under the MIT license. See the complete license in the\nbundle:\n\n[LICENSE](https://github.com/ianfoulds/js-routing-bundle/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxactsystems%2Fjs-routing-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxactsystems%2Fjs-routing-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxactsystems%2Fjs-routing-bundle/lists"}