-
Notifications
You must be signed in to change notification settings - Fork 9
Ui router vs angular routing
Luke Aldworth Davis edited this page Oct 31, 2015
·
3 revisions
Some of these are probably more subjective that objective, but I will try to be as fair to UI Router as I can.
- Seperation of Application State and View State
- Full support for transition control between state, not just enter/exit or a global state changed handler
- A Simpler view model that still adds more flexibility through the view service
- Sibling lookup in terms of "next" and "prev".
- Parameter converters, UI Router has support for regex parameters but it seems more limited
- Providing means to simply refresh views rather than reloading templates as well (see sticky and $view-refresh)
- Enhancement of scrolling.
- Support for simple loaders if resolve is used.
- Un-nanmed views.
- Abstract states. (Angular Routing don't need them)
- Support for route matching through functions.
- More used.
- Smaller footprint.
- Compatible with angular 1.0.x
I will try to give an overview over things that are different yet provide the same basic feature.
UI Router | Angular Routing | Comments |
---|---|---|
<div ui-view="name" /> | <div jem-view="name" /> | View names are enforced for Angular Routing |
<a ui-sref="state({ id: contact.id })" /> | <div sref="'state'" params="{ id: contact.id }" /> | View names are enforced for Angular Routing |
- Route Provider
- Basic Configuration
- Parameters and Converters
- Decorators
- Case Sensitivity
- A Word on Trailing Slashes
- Legacy Support
- State Provider
- Basic Configuration
- Hierarchy Configuration
- Views
- Routes
- Transitions
- Resolve
- State Service
- Transition Provider
- Basic Configuration
- Stage Handlers
- Targeting Multiple States
- View Provider
- Updating Views
- Transactions
- Scroll Provider