【文件属性】:
文件名称:cycle-route:一个用于路由的Cycle.js帮助器
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-01 21:02:15
JavaScript
单车路线
一个简单的路由器工厂,它采用route =>标签的静态映射,并返回将路径映射到路由对象的函数。
它被创建为与一起使用,但它是一个通用的URL映射器,可以在任何路由引擎中用作帮助程序。
安装
npm install cycle-route
原料药
makeRouter(routes)
输入从路由定义到路由名称的映射,并返回路由器功能。 cycle-route用途所以它接受所有路由定义是routington接受并增加了一个*路线定义缺省路由。
路线对象的格式
{
path : '/' , // this is the input path
name : 'home' , // this is the value from the routes map
params : { } // this are the matched p
【文件预览】:
cycle-route-master
----.gitignore(37B)
----package.json(817B)
----src()
--------index.js(715B)
----README.md(2KB)
----lib()
--------.gitignore(26B)
--------.npmignore(0B)
----.npmignore(9B)
----test()
--------index.js(2KB)
--------\(853B)