Framework internals
Explore how Aurelia's compiler turns templates into instructions and how the runtime executes them.
From Template to Runtime
Template
<my-element value.bind="name" click.trigger="doSomething()">
<p>${message}</p>
</my-element>Compilation Phase
const instructions = [
[ // Instructions for <my-element>
new HydrateElementInstruction(
'my-element', // Element name/definition
[ // Property instructions
new PropertyBindingInstruction('name', 'value', BindingMode.toView),
new ListenerBindingInstruction('doSomething()', 'click', false, null)
],
null, // Projections
false, // Containerless
[], // Captures
{} // Data
)
],
[ // Instructions for <p> inside my-element
new InterpolationInstruction('message', 'textContent')
]
];Runtime Phase
Instruction Types and What They Do
Component Creation
Data Binding
Event Handling
Static Values
Advanced Features
Debugging with Instructions
Inspecting Compiled Instructions
Understanding Instruction Arrays
Debugging Binding Issues
Common Template Patterns
Basic Property Binding
Event Binding
String Interpolation
Custom Element with Bindables
Template Controller (Repeater)
Extending the System
Creating Custom Instructions
Creating Custom Renderers
Registering Custom Renderers
Resource Registration and Discovery
Resource Registration Patterns
Decorator-Based Registration
Static $au Property Registration
$au Property RegistrationConvention-Based Registration
Resource Resolution During Compilation
Resource Resolution During Runtime
Container Hierarchy and Resource Scope
Debugging Resource Registration
Resource Registration Best Practices
Last updated
Was this helpful?