You're reading the 1.x docs. Go to latest

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 ​

The server-side overview maps the verdict, render and host choices to the pages below.

  • 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), and lit-ui-router-ssr for prerendering those verdicts to static html at build time
  • Prerender with Vite — one serverRouterPlugin option and a prerender script turn vite build into one HTML page per route, a 404.html and a _redirects file, decided by the app's own route table
  • Prerender with Eleventy — Eleventy writes the pages, the layout and the host rules; prerender() decides what each path is and renders it, and the client adopts the served page

Transitions & Guards ​

  • Route Guards — protect states with transition hooks: the requiresAuth pattern, redirect-to-login, and returning the user after authentication
  • Loading and Error Views — a pending indicator while a transition runs, skeletons for NOWAIT resolves, and an error view with retry when a transition fails
  • Component Lifecycle Hooks — uiCanExit for unsaved-changes prompts and uiOnParamsChanged for dynamic parameters
  • Routed Components — reading a state's params through a resolve, code-splitting a route's element with an awaited import or a lazyLoad future state, and reaching the element a view rendered
  • Named Views — fill several <ui-view name="…"> viewports from one state with views, and target a view another state created with name@state, relative ^ anchors and absolute ! paths
  • View Fallback Content — what a <ui-view> renders when no routed component is active: the capture rules, the master/detail idiom, and what a prerendered shell emits
  • 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

Builds & Diagnostics ​

  • Development and Production Builds — the development export condition, the warnings the development build carries and the production build cannot print, and which packages ship two builds at all

Reactivity ​

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

Companion Packages ​

The companion packages — Effect, MobX and Signals bindings, the Navigation API location plugin, typed state names, server-side routing verdicts, static prerendering and ESLint rules — are optional and independently versioned, each with its own guide and API reference.