English | 简体中文
wia router
Introduction
wia router
is the official router for wia.js. It deeply integrates with wia.js core to make building Multiple Page Applications with wia.js a breeze. Features include:
- Nested route/view mapping
- Page-based router No configuration
- Dynamic loading of html, css, js
- Route params, query, wildcards
- Links with automatic active CSS classes
- Hash mode
Build
You will need Node.js installed on your system.
First, install all required dependencies
$ npm install
To build development version:
$ npm run build-dev
The resulting files are:
- dist/router.common.js
- dist/router.common.map
- dist/router.esm.js
- dist/router.esm.map
- dist/router.umd.js
- dist/router.umd.map
To build production (minified) version:
$ npm run build
The resulting files are:
- dist/router.common.js
- dist/router.common.min.js
- dist/router.esm.js
- dist/router.esm.min.js
- dist/router.umd.js
- dist/router.min.js
use
import Router from @wiajs/router
Stay In Touch
- For latest releases and announcements, follow on Twitter: @wiajs
License
Copyright (c) 2020-present Sibyl Yu