Skip to content

Guides

Task-oriented pages for the concepts real apps hit after the tutorial. Each guide is grounded in the sample app's working implementation — a webmail + contacts client deployed across every point on the server-support spectrum.

URLs & Location

  • Location Plugins — choosing a URL strategy: hash, pushState, or the Navigation API; server rewrites, the <base> tag, and the initial rule
  • Unmatched URLs (404) — route URLs that match no state to a deliberate 404 state with urlService.rules.otherwise
  • Server-Side Routing — serve routing verdicts at the edge with ui-router-server: the app shell for real routes, 302 entry redirects, and real 404s for everything else, across the full server-support spectrum (every level live on the site). Routing honesty ships today; content rendering — build-time pre-rendering and server-side rendering — is the roadmap next axis on the same spine

Transitions & Guards

  • Route Guards — protect states with transition hooks: the requiresAuth pattern, redirect-to-login, and returning the user after authentication
  • Component Lifecycle HooksuiCanExit for unsaved-changes prompts and uiOnParamsChanged for dynamic parameters
  • Design System Links — driving a design system's link component (<sp-link>, <md-*>, an in-house one) with uiSref: assignHref: true is the option for a custom element that declares its own href, and 'auto' scopes the attribute to real <a> elements, with a live example contrasting all three cases

Reactivity

  • Reactive Components — keep components outside <ui-view> in sync with the router using the zero-dependency TransitionController

Companion Packages

The MobX bindings and the Navigation API location plugin are optional companion packages — each independently versioned, with its own guide and API reference. ui-router-server, the server-side routing package, is in development on the same model.