
UI-Router
A routing library for AngularJS apps that maps URLs to nested app states and views.
- Stars
- 13.4k
- Forks
- 2.9k
- Licence
- MIT
- Language
- TypeScript
- Last update
- 10 months ago
- Type
- Library
What it is
UI-Router is a client-side routing framework for AngularJS, the older 1.x version of Angular. It keeps the browser URL in sync with what the app is showing, so a user can bookmark a deep page inside a single-page app. Apps are organized as a tree of named states, and the library manages moving between them as a state machine.
- Map URLs such as product pages to nested app states with their own views
- Let a browser back or forward action move through application states
- Create bookmarkable links to specific screens deep inside a single-page app
Great for
- Teams maintaining an existing AngularJS 1.x application
- Developers who need nested views that follow URL structure
- Apps where deep-linkable, bookmarkable pages matter
Not ideal for
- New projects: the README points newer work to separate UI-Router versions for Angular 2 and React, so this 1.x package targets AngularJS specifically
- Projects still on UI-Router 0.x, which the README says lives on a separate legacy branch
- Non-developers, since it is a code library with no standalone interface
How to get it
- 1
Install with a package manager
You'll need: AngularJS 1.x application
Clone the repository
git clone https://github.com/angular-ui/ui-router - 2
Run it
- Read the Get Started tutorial for UI-Router for Angular 1 linked in the README
- Include the library in your AngularJS page or build, as described in the guide
- Define your first state with a URL and a view
- Navigate to that URL in the browser to confirm the view loads
- 3
Get the most out of it
- Use the in-depth guide on the project wiki for advanced state configuration
- Consult the API docs for the full list of state and transition options
- Check the FAQ on the wiki when you hit common questions
- Look at the linked sample app to see a working example of nested states
Downloads
Strengths
- Built around a hierarchical state tree that maps cleanly to nested views
- URL and app state stay in sync, which supports bookmarks and shareable links
- Includes tutorials, API docs, and a sample app linked from the README
Trade-offs
- Targets AngularJS 1.x, an older framework; the README does not describe a migration path within this package
- The README is truncated and gives little detail on installation or configuration here
- Learning the state-machine model takes time for developers new to it
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| ui-router (this) | 13.4k | Library | intermediate | 10 months ago | Teams maintaining an existing AngularJS 1.x application |
| router | 15.3k | Library | intermediate | 4 days ago | React developers who want type-checked routes and URL parameters |
| xstate | 30.4k | Library | intermediate | 4 days ago | Frontend developers managing complex UI flows with many interacting states |
| immer | 29k | Library | beginner | 5 days ago | JavaScript developers who find hand-written immutable updates verbose or error-prone |
| vue-router | 18.9k | Library | intermediate | 7 months ago | Maintainers of existing Vue 2 apps that already use vue-router 3 |
| barba | 13k | Library | intermediate | 1.9 years ago | Developers adding animated transitions to an existing multi-page website |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.