Addons for Angular UI-Router:
Full Website (description, API, demos): http://christopherthielen.github.io/ui-router-extras/
Future state has been modified to manage nested routes and views. I have also added in the companion route provider.
UI-Router is the defacto router for AngularJS.
UI-Router Extras adds additional features to help you write large modular applications.
- Sticky State
- Deep State Redirect
- Future State: modified from the master by jtb to manage future state differently
- Previous State
- And More?
Dependencies
- required:
- "angular": "~1.2.0"
- "angular-ui-router": "~0.2.8"
Note: ui-router-extras test suite runs against UI-Router versions 0.2.8, 0.2.10, 0.2.12, 0.2.13 Support for older versions of ui-router is likely to disappear in the future.
Monolithic Install
- download the files
- NPM
- run
npm install jtb-ct-ui-router-extras --save-dev
- run
- Bower (alternatively)
bower install jtb-ct-ui-router-extras --save-dev
- NPM
- Include the files in your app
jtb-ct-ui-router-extras.min.js
- Include the module as an angular dependency (i.e. in
app.js
) -jtb-ct.ui.router.extras
Modular Install
- download the files
- NPM
- run
npm install jtb-ct-ui-router-extras --save-dev
- run
- Bower (alternatively)
bower install jtb-ct-ui-router-extras --save-dev
- NPM
- Choose the modules you want. You must include core.
- core Core requirement. Adds state.$$state() decorator (undocumented)
- sticky Sticky states
- dsr Deep State Redirect
- future Future states
- previous Previous state (depends on transition)
- statevis D3 based State visualization as seen on the demo site (undocumented)
- transition Injectible transition promise (undocumented)
- Include the files for the modules you want into your app
modular/ct-ui-router-extras.core.min.js
modular/ct-ui-router-extras.sticky.min.js
modular/ct-ui-router-extras.dsr.min.js
modular/ct-ui-router-extras.future.min.js
modular/ct-ui-router-extras.previous.min.js
modular/ct-ui-router-extras.statevis.min.js
modular/ct-ui-router-extras.transition.min.js
- Include the submodules as an angular dependency (i.e. in
app.js
) - e.g.,ct.ui.router.extras.sticky
Development
-
git checkout master
- run
npm install && bower install
- write your code then run
gulp
- git commit your changes
- run
The gulpfile.js default target generates the output files into a build/ and build/modular directory. It runs all unit tests on the modular files individually, and then runs the tests against the full build file. When run on the full build file, the test suite is run once against each version of UI-Router listed above.
This repo is a fork from the orignal written by Christopher Thielen. It contains a different support mechanizm for future state.