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 theinitialrule - 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), andlit-ui-router-ssrfor prerendering those verdicts to static html at build time - Prerender with Vite — one
serverRouterPluginoption and a prerender script turnvite buildinto one HTML page per route, a404.htmland a_redirectsfile, 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
requiresAuthpattern, redirect-to-login, and returning the user after authentication - Loading and Error Views — a pending indicator while a transition runs, skeletons for
NOWAITresolves, and an error view with retry when a transition fails - Component Lifecycle Hooks —
uiCanExitfor unsaved-changes prompts anduiOnParamsChangedfor dynamic parameters - Routed Components — reading a state's params through a resolve, code-splitting a route's element with an awaited import or a
lazyLoadfuture state, and reaching the element a view rendered
Links & Markup
- Named Views — fill several
<ui-view name="…">viewports from one state withviews, and target a view another state created withname@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) withuiSref:assignHref: trueis the option for a custom element that declares its ownhref, and'auto'scopes the attribute to real<a>elements, with a live example contrasting all three cases
Builds & Diagnostics
- Development and Production Builds — the
developmentexport 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-dependencyTransitionController
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.