Lazy page outlets
Page-level imports keep a growing SPA modular and avoid loading every page at startup.
Start with your first page. Shared ui* providers are registered by createAdmin. Examples belong inside a route template, not the root HTML document. The page and its optional controller load through Atrium’s lazy route registry.
Minimal example
const routes = [ { path: '/reports', label: 'reports', template: 'pages/reports.html', module: 'pages/reports.js', },];Settings and behavior
- template is application-root-relative and contains exactly one root element.
- module is optional and exports register(context).
- The build-generated virtual:atrium/pages registry must be passed to createAdmin.
- Consumer context supplies adapters. Page registration must not start requests or timers.
- Provider init owns startup and destroy owns cleanup.
- The outlet handles loading, permission changes, failed chunks, retry, focus, and stale imports.
Integration notes
Do not insert untrusted HTML or use x-html for backend content. Render text with x-text and compile trusted templates at build time. Follow your first page for a complete example.
Working reference
See the page outlet. Return to the component index.
Author
Laurent Declercq l.declercq@agon-innovation.ch
License
Unless otherwise stated all source code is licensed under LGPL 2.1 and has the following copyright:
© 2026, Agon Partners Innovation AG, All rights reserved.The design material and the “Agon Ātrium” trademark is the property of their authors. Reuse of them without prior consent of their respective authors is strictly prohibited.
Version
Version: 20260921