Dynamic composition
Render components and templates dynamically with Aurelia's au-compose element.
Quick Reference
Bindable
Accepts
Default
Purpose
Component Composition
Composing with Custom Element Definitions
Composing with Component Names
Template-Only Composition
Basic Template Composition
Dynamic Templates with Data
Template with Component Object
Controlling the Host Element
Default Host Behavior
Creating a Host Element with tag
tagPractical Host Element Example
Passing Data with Models and the Activate Method
Understanding the Activate Lifecycle
Using Models for Data Passing
Model Updates vs Component Changes
Advanced Features
Promise Support
Scope Behavior Control
Plain object components and missing properties
Accessing the Composition Controller
Tracking Pending Compositions
Synchronous and Asynchronous Updates
Real-World Examples
Form Builder with Dynamic Fields
Plugin Architecture with Dynamic Loading
Content Management with Dynamic Layouts
Migrating from Aurelia 1
Property Name Changes
Component Reference Changes
String Handling Changes
Scope Inheritance Changes
Migration Examples
Before (Aurelia 1):
After (Aurelia 2):
Dynamic Module Loading Migration
Value Converter Pattern for Remote Templates
Common Migration Gotchas
Best Practices
Next steps
Last updated
Was this helpful?