Skip to content
프로젝트

소개

Web Components용으로 작고 강력한 클라이언트 측 라우터입니다. 특정 프레임워크에 종속되지 않습니다.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

NPM version npm bundle size (minified + gzip)

Vaadin Router is deprecated

This library is no longer actively maintained. Vaadin uses React Router as a primary client-side routing tool.

Consider @lit-labs/router as a more lightweight and modern alternative. Also, as the URLPattern API is universally available in modern browsers nowadays, we recommend using that for building customized client-side routing.


Vaadin Router

Live demo | API documentation

Vaadin Router is a small and powerful client-side router JS library. It uses the widely adopted express.js syntax for routes (/users/:id) to map URLs to Web Component views. All features one might expect from a modern router are supported: async route resolution, animated transitions, navigation guards, redirects, and more. It is framework-agnostic and works equally well with all Web Components regardless of how they are created (Polymer / SkateJS / Stencil / Angular / Vue / etc).

Vaadin Router is a good fit for developers that do not want to go all-in with one framework, and prefer to have freedom in picking the components that work best for their specific needs.

npm install --save @vaadin/router
import {Router} from '@vaadin/router';

const router = new Router(document.getElementById('outlet'));
router.setRoutes([
  {path: '/', component: 'x-home-view'},
  {path: '/users', component: 'x-user-list'}
]);

Browser support

A specific version of Vaadin Router supports the same browsers as the Vaadin platform major version which includes that version of Vaadin Router. See Vaadin platform release notes for details on included Vaadin Router version and supported technologies. The Supported Technologies section is typically listed in the release notes of the first publicly available release of a Vaadin platform major version (for example Vaadin 18.0.1 since 18.0.0 was skipped).

Desktop browsers

Evergreen versions of the following browsers

  • Chrome, Firefox, Firefox ESR, Safari and Edge (Chromium)

Mobile browsers

Built-in browsers in the following mobile operating systems:

  • Safari starting from iOS 13 (Safari 13 or newer)
  • Google Chrome evergreen on Android (requiring Android 4.4 or newer)

Sauce Labs test status

Sauce Test Status

Big Thanks

Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs.

Running demos and tests in the browser

  1. Fork the vaadin/router GitHub repository and clone it locally.

  2. Make sure you have npm installed.

  3. In the router directory, run npm install to install dependencies.

  4. Run npm run build to build the library.

  5. Run npm start, and open http://localhost:4173 in your browser to see the component live demos and API documentation.

Running tests from the command line

  1. In the router directory, run npm test

Following the coding style

We are using ESLint for linting JavaScript code. You can check if your code is following our standards by running npm run lint, which will automatically lint all .js files as well as JavaScript snippets inside .html files.

Contributing

  • Make sure your code is compliant with our code linters: npm run lint
  • Check that tests are passing: npm test
  • Submit a pull request with detailed title and description
  • Wait for response from one of Vaadin components team members

License

Apache License 2.0

Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.

관련 프로젝트 살펴보기

불러오는 중…