{"id":14983634,"url":"https://github.com/isychev/fos-routing","last_synced_at":"2025-04-10T19:04:28.889Z","repository":{"id":57241033,"uuid":"94420944","full_name":"isychev/fos-routing","owner":"isychev","description":"es6 library for client generate path from symfony2 routing","archived":false,"fork":false,"pushed_at":"2019-01-16T08:06:41.000Z","size":31,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T18:41:26.020Z","etag":null,"topics":["fos","fosjsrouting","fosjsroutingbundle","fosrouting","js","routing","symfony","symfony2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isychev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-15T09:01:06.000Z","updated_at":"2020-12-18T12:48:44.000Z","dependencies_parsed_at":"2022-09-07T23:13:07.445Z","dependency_job_id":null,"html_url":"https://github.com/isychev/fos-routing","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isychev%2Ffos-routing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isychev%2Ffos-routing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isychev%2Ffos-routing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isychev%2Ffos-routing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isychev","download_url":"https://codeload.github.com/isychev/fos-routing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279198,"owners_count":21077406,"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":["fos","fosjsrouting","fosjsroutingbundle","fosrouting","js","routing","symfony","symfony2"],"created_at":"2024-09-24T14:07:42.648Z","updated_at":"2025-04-10T19:04:28.862Z","avatar_url":"https://github.com/isychev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fos-routing\nes6 library for client generate path from symfony2 routing\n\n### Installing\n\n```javascript\nnpm install fos-routing --save\n```\n\n### Usage\nTo work with Symfony2, you need to generate a js or json file with paths with **fos:js-routing**\n\n```php bin/console fos:js-routing:dump --callback=\"module.exports = \" --target=\"any_custom_path || web/dist/fos_js_routes_export.js\"```\n\nThe `--target` parameter is made, for example, it can be any\n\nThen, you should connect the newly created file in fos-routing\n\n\n```js\n// myRouting.js\n// import library fos-rouging\nimport Routing from 'fos-routing';\n// import file with routes data\nimport RoutingData from 'path_to_folder_when_generate_file_with_routing_data || /web/dist/fos_js_routes_export';\n\n// set data\nRouting.setData(RoutingData);\n\n// export library\nexport default Routing;\n```\n\nIn the main project\n\n```js\n// In the main project\nimport Routing from 'path_to_myRouting.js';\n\nconsole.log(Routing.generate('demo_path'));\n```\n\n### forRouting Methods\n| Method | Params | Description\n:---|:---|:---\n| `setData` | data:Array | Set data |\n| `generate` | 1. `routing_name`: String  2.`params`:Object of params | Generate routing by `routing_name` with `params`, return string |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisychev%2Ffos-routing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisychev%2Ffos-routing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisychev%2Ffos-routing/lists"}