Socket
Socket
Sign inDemoInstall

san-router

Package Overview
Dependencies
0
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    san-router

Router for San


Version published
Weekly downloads
173
increased by20.14%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

2.0.1

  • [fix] router.push 方法,当不传入 path 并且传入 query 为空时,原有的 location 中的 query 仍被保留

Readme

Source

san-router

NPM version License

San 框架的官方 router,支持动态路由,嵌套路由,路由懒加载以及导航守卫等功能。

注意:使用 san-router,要求 San 的版本号 >= 3.0.2

文档 | 示例项目

下载

# use npm
npm i san-router
# or use yarn
yarn add san-router

使用

如需了解更多功能,请访问 快速开始

import {router, Link} from 'san-router';

router.add({
    rule: '/book',
    Component: BookDetail
});
router.add([
    {
        rule: '/about',
        Component: About
    },
    {
        rule: '/home',
        Component: Home
    }
]);
router.start();

CHANGELOG

CHANGELOG

License

san-router is MIT licensed.

FAQs

Last updated on 25 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc