fe-router

1.0.3 • Public • Published

fe-router

Analytics

This is a mini frontend router.

install

npm i fe-router -D

use

const FERouter = require('fe-router')

const routeMap = {
    '/': function () {
        xxx
    },
    '/1': function () {
        xxx
    }
}

const router = new FERouter({
    history: false, // true: history model,  false: hash model, default model: hash model
    routeMap
})

router.push('/')
router.push('/1')

Readme

Keywords

Package Sidebar

Install

npm i fe-router

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

5.77 kB

Total Files

8

Last publish

Collaborators

  • palmerye