Awesome
END OF LIFE NOTICE
UI-Router 1.0 now includes all the features of ui-router-extras out of the box, or as a plugin. As such, we are no longer actively maintaining ui-router-extras.
We will still accept well written pull requests and publish new releases as pull requests are merged. However, we're not watching this repository issues like we used to.
For users of sticky states: https://github.com/ui-router/sticky-states
For users of deep state redirect: https://ui-router.github.io/ng1/docs/latest/interfaces/ng1.ng1statedeclaration.html#redirectto and https://github.com/ui-router/dsr
For users of future states: https://ui-router.github.io/ng1/docs/latest/interfaces/ng1.ng1statedeclaration.html#lazyload
For users of previous states: https://github.com/christopherthielen/ui-router-extras/issues/371#issuecomment-331553096
Thank you for using UI-Router Extras!
Addons for Angular UI-Router:
Full Website (description, API, demos): http://christopherthielen.github.io/ui-router-extras/
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
- 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 ui-router-extras --save-dev
- run
- Bower (alternatively)
bower install ui-router-extras --save-dev
- NPM
- Include the files in your app
ct-ui-router-extras.min.js
- Include the module as an angular dependency (i.e. in
app.js
) -ct.ui.router.extras
Modular Install
- download the files
- NPM
- run
npm install ui-router-extras --save-dev
- run
- Bower (alternatively)
bower install 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.