{"id":13531862,"url":"https://github.com/lc-soft/lcui-router","last_synced_at":"2025-04-18T11:31:04.846Z","repository":{"id":47892950,"uuid":"201754420","full_name":"lc-soft/lcui-router","owner":"lc-soft","description":"The official router for LCUI. ","archived":false,"fork":false,"pushed_at":"2021-08-12T02:07:23.000Z","size":134,"stargazers_count":9,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-02T18:41:40.520Z","etag":null,"topics":["c","lcui","router"],"latest_commit_sha":null,"homepage":"","language":"C","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/lc-soft.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":"2019-08-11T11:12:44.000Z","updated_at":"2024-03-09T07:07:07.000Z","dependencies_parsed_at":"2022-09-21T12:22:53.249Z","dependency_job_id":null,"html_url":"https://github.com/lc-soft/lcui-router","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-soft%2Flcui-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-soft%2Flcui-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-soft%2Flcui-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-soft%2Flcui-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lc-soft","download_url":"https://codeload.github.com/lc-soft/lcui-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223780182,"owners_count":17201283,"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":["c","lcui","router"],"created_at":"2024-08-01T07:01:06.343Z","updated_at":"2024-11-09T02:37:21.925Z","avatar_url":"https://github.com/lc-soft.png","language":"C","funding_links":[],"categories":["Projects"],"sub_categories":[],"readme":"# lcui-router\n\n(**English**/[中文](README.zh-cn.md))\n\n[![GitHub Actions](https://github.com/lc-soft/lcui-router/workflows/C%2FC%2B%2B%20CI/badge.svg)](https://github.com/lc-soft/lcui-router/actions)\n[![Build Status](https://travis-ci.org/lc-soft/lcui-router.svg?branch=master)](https://travis-ci.org/lc-soft/lcui-router)\n[![Coverage Status](https://coveralls.io/repos/github/lc-soft/lcui-router/badge.svg?branch=master)](https://coveralls.io/github/lc-soft/lcui-router?branch=master)\n\n## Introduction\n\nLCUI Router is the official router for [LCUI](https://github.com/lc-soft/LCUI). It provides a similar development experience to the [Vue Router](https://github.com/vuejs/vue-router) and make building multiple views applications with LCUI a breeze. Features include:\n\n- Nested route/view mapping\n- Modular, component-based router configuration\n- Route params, query, wildcards\n- Fine-grained navigation control\n- Links with automatic active CSS classes\n\n## Installation\n\n**Windows:**\n\nInstall with [LCPkg](https://github.com/lc-soft/lcpkg):\n\n```bash\nlcpkg install github.com/lc-soft/lcui-router\n```\n\n**Linux:**\n\nDownload source code and copy it to your project directory.\n\n## Getting Started\n\n\u003e **Note:** We will using [lcui-cli](https://github.com/lc-ui/lcui-cli) tool to manage the configuration and source code for the router.\n\nCreate an LCUI application project:\n\n``` bash\nlcui create myapp\ncd myapp\n```\n\nOverwrite the following code to the file `app/assets/views/app.xml`:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003clcui-app\u003e\n  \u003cresource type=\"text/css\" src=\"assets/stylesheets/app.css\"/\u003e\n  \u003cui\u003e\n    \u003cw\u003e\n      \u003ctextview\u003eHello App!\u003c/textview\u003e\n      \u003cw\u003e\n        \u003c!-- use router-link component for navigation. --\u003e\n        \u003c!-- specify the link by passing the `to` prop. --\u003e\n        \u003crouter-link to=\"/foo\"\u003eGo to Foo\u003c/router-link\u003e\n        \u003crouter-link to=\"/bar\"\u003eGo to Bar\u003c/router-link\u003e\n      \u003c/w\u003e\n      \u003c!-- route outlet --\u003e\n      \u003c!-- component matched by the route will render here --\u003e\n      \u003crouter-view /\u003e\n    \u003c/w\u003e\n  \u003c/ui\u003e\n\u003c/lcui-app\u003e\n```\n\nGenerate two widgets:\n\n```bash\nlcui generate widget foo\nlcui generate widget bar\n```\n\nSave following code as file `config/router.js`:\n\n```js\nmodule.exports = [\n  { path: '/foo', component: 'foo' },\n  { path: '/bar', component: 'bar' }\n]\n```\n\nCompile config file for router:\n\n```bash\nlcui compile router\n```\n\nRun app:\n\n``` bash\nlcpkg run start\n```\n\nFor more examples, please see the [lcui-router-app](https://github.com/lc-ui/lcui-router-app) project.\n\n## Documentation\n\nLCUI Router is referenced from Vue Router, so you can read the [Vue Router documentation](https://router.vuejs.org/) to learn about the basic usage of LCUI Router.\n\n## License\n\n[MIT licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flc-soft%2Flcui-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flc-soft%2Flcui-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flc-soft%2Flcui-router/lists"}