A tiny foundation that providing nested state-based routing for complex web application.
npm install statemanStateMan
=======



stateman: A tiny foundation that provides nested state-based routing for complex web applications.
stateman is highly inspired by ui-router; you will find many features similar to it.
But stateman is a __standalone library__ with an extremely tiny codebase (10kb minified). Feel free to integrate it with whatever framework you like!
0. nested routing support.
1. standalone with tiny codebase.
2. async routing support if you need asynchronous logic in navigating. Support Promise
3. html5 history supported, fallback to hash-based in old browser.
5. concise API, deadly simple to getting start with it.
6. support IE6+ and other modern browsers.
7. __well tested, born in large product.__
You may need a static server to run the demo. puer is simple to get start.
just paste the code to your own index.html, and load it up in a browser.
``html
`
open the console to see the output when navigating.
###1. Simple Layout Demo:
The code in this demo is for demonstration only. In a production development, you will want a view layer to create nested views.
###2. A simple SPA built upon Regularjs (Living Template) + requirejs + stateman: Link
I create a simple wrapping (regular-state) to integrate stateman with Regularjs, which makes it easy to build a single Page Application. thanks to the concise API, the code is very clean. You will find that integrating stateman with other libraries is also simple.
1. Modern browsers, including mobile devices
2. IE6+
`javascript`
bower install stateman
stateman.js have been packaged as a standard UMD, so you can use it in AMD, CommonJS and as a global.
`js`
npm install stateman
To use:
`js`
var StateMan = require('stateman');
`js`
spm install stateman
To use:
`js`
var StateMan = require('stateman');
`js`
component install leeluolee/stateman
To use:
`js`
var StateMan = require('leeluolee/stateman');
1. stateman.js
2. stateman.min.js
Some basic examples can be found in the examples directory.
__run demo local__
1. clone this repo
2. npm install gulp -g && npm installgulp server`
3.
4. check the example folder
MIT.