Skip to content

theDevelopper/es6-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

es6-router

import Router from 'es6-router';

let router = new Router();
router
    .add('/home', (params) => { // add new route
        console.log('home route', params);
    })
    .add('/movies/:id', (params) => { // add new route with paramters
        console.log('movies route', params); // params = {id: ?}
    })
   
    .check() // set current route
    .listen() // listen to route changes
    .navigate('/home'); // navigate to route 'home'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published