Attention: UI-Router uses grunt >= 0.4.x
make sure to upgrade your environment and read the
Migration Guide.
Finally a de-facto solution to nested views and routing.
To evolve the concept of an Angular "Route" into a more general concept of a "State" for managing coarse application UI states.
- A state manager
$stateProvider
and$state
, keeps state logic separate from routing logic. - Nested states (parent/child relationships).
- Can set multiple views via named views.
ui-view
directive. - URL Routing
- Backwards compatible with Angular v1 router
- Various other nuggets of goodness
- In-depth Overview
- Sample App (Source)
- Generated Docs
- Latest build: angular-ui-states.min.js (uncompressed angular-ui-states.js)
Dependencies for building the solution and running tests:
- karma - run:
$ npm install -g karma
- grunt-cli - run:
$ npm install -g grunt-cli
- Then install development dependencies with:
$ npm install
There is a number of targets in the gruntfile that is used to building the solution, documents etc.
grunt
: Perform a normal build, runs jshint and karma testsgrunt build
: Perform a normal buildgrunt dist
: Perform a clean build and generate documentationgrunt dev
: Run dev server and watch for changes, builds and runs karma tests on changes.