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'
-
Notifications
You must be signed in to change notification settings - Fork 0
License
theDevelopper/es6-router
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published