Giter Site home page Giter Site logo

stradivario / vaadin-router Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vaadin/router

0.0 1.0 0.0 5.03 MB

Small and powerful client-side router for Web Components. Framework-agnostic.

Home Page: https://vaadin.com/router

License: Apache License 2.0

JavaScript 41.10% HTML 56.39% TypeScript 2.51%

vaadin-router's Introduction

NPM version npm bundle size (minified + gzip) Build Status Gitter

Vaadin Router

Live Demo โ†— | API documentation โ†—

router hero banner

A client-side router for Web Components

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

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 repository and clone it locally.

  2. Make sure you have npm installed.

  3. When in the vaadin-router directory, run npm install and then npm run install:dependencies to install dependencies.

  4. Run npm start, and open http://127.0.0.1:8000/components/vaadin-router in your browser to see the component API documentation.

  5. You can also open demo or in-browser tests by adding demo or test to the URL, for example:

Running tests from the command line

  1. When in the vaadin-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.

vaadin-router's People

Contributors

web-padawan avatar platosha avatar someonetoignore avatar qtdzz avatar abdonrd avatar manolo avatar haijian-vaadin avatar jouni avatar stradivario avatar limonte avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.